[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Typing allergy



Reply to note from ajx  Mon, 05 Jan 2004 08:51:12
+0100

> 2. Somewhere along the line I came across an advice from
> XyQuest to use any variable from 0 - 9 (not 00 - 09).

That's nonsense, even if XyQuest did say so. First of all, 00 HAS
to be used to pass arguments; there's no alternative. Equally, the
"transient" S/Gs 01-99 (not 09) are, almost by definition, common
property because they're the only ones that vanish without a trace
when the program is done. It's insane not to use S/Gs in this range
when the purpose doesn't require a global (memory-resident) value;
"ordinary" (0-9|A-Z) and "permanent" (100-1999) burden memory, and
ultimately degrade performance, unless laboriously zeroed out upon
EXit. Memory-resident S/Gs should only be used for persistent
values required by different programs (or by a single program at
different times).

There is a statement in XY4.DLG to the effect that 00-99 are
"reserved" for use by the menus; it's misleading. The implication
is that variables set by user programs might clash with menu
variables, but that's a consideration only if a user program calls a
menu (DiaLoG) routine, and even then only to the extent of any
overlapping S/Gs. If your program calls a DiaLoG routine that uses,
say, S/Gs 01-04, start your program at 05; alternatively, you can
use U2 routines HIDE and UNHIDE to prevent values from being changed
by the called process. Clashes of this kind are not a reason to
resort to memory-resident S/Gs.

> but I don't run selected code very often ..

Meaning...? If you only hammer nails once in a while, the back end
of screw driver will do -- but a hammer still does it better.

--
Carl Distefano
cld@xxxxxxxx