[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: Help with TODAY
- Subject: Re: Help with TODAY
- From: Carl Distefano cld@xxxxxxxx
- Date: Mon, 29 May 2006 20:51:30 -0400
Reply to note from Harry Binswanger Mon, 29 May
2006 16:35:50 -0400
> Re TODAY: That fixed it! Thanks.
Good.
> Re HIDE, would there be any economical way to have all U2
> frames automatically HIDE and UNHIDE their own variables? That
> would probably be too mammoth an undertaking, huh?
In short, no (to the first question). Robert and I went around this
block during and after the development of HIDE. We concluded that
it would be unnecessary, and wasteful of limited S/G memory, to have
every U2 frame HIDE its own S/Gs. Much more efficient, we decided,
to have the parent frame (i.e., the frame calling a U2 routine) do
the HIDEing as needed -- i.e., HIDE only those S/Gs that the parent
(calling) frame needs to protect from being overwritten. Mammoth
undertakings don't faze us, but, in this case, the practice makes
sense. No reason to change it.
> If I can rely on the .inf- reported ranges, I will have
> XyBasic automatically hide/unhide that range on any call to
> U2.
I would counsel against that (read on). But, in any event, don't
rely on INF! U2 changes constantly, but the Help screen INFormation
doesn't always keep pace. There is no substitute for direct
examination of the called frame to determine S/G usage. (Frame
CHKSEQ can help, but it is not foolproof. For one thing, it doesn't
analyze S/G usage in child routines.)
You're right about S/G usage in TODAY. My earlier message ignored
the call to DOW (which in turn calls PARSEDATE). The correct HIDE
statement is:
JM 2.HIDE:01-07,51-53Q2 ;*;
HOWEVER, you may not need to HIDE all of those S/Gs! Any S/Gs not
used by your parent program can -- should! -- be omitted from HIDE.
For example, if the parent uses only 01-05, then HIDE:01-05 will
suffice. Think about it: There's no need to HIDE any value that
the parent routine doesn't use. That's why the rote HIDEing of all
S/Gs used in a child routine -- even if they could be identified
robotically, which they can't -- is contraindicated. More often
than not, it would be overkill.
The point here, Harry, is that HIDEing is slow and hogs memory. You
want to do as little of it as possible.
--
Carl Distefano
cld@xxxxxxxx