In a recent note, Charles Mills said:

> Date:         Wed, 23 Aug 2006 10:58:58 -0400
> 
> Isn't there kind of a fundamental logical schizophrenia in Rexx in that you
> can have a program in which FOO is not a variable, yet SAY FOO is a valid
> instruction.
> 
"signal on novalue" does much to clarify that.
> Similarly
> 
> BAR. = "X"
> SAY BAR.17
> 
> outputs a value of "X" yet one would expect that an enumeration of BAR.
> would not "find" BAR.17
> 
No.  Most naively, one would expect that an enumeration would find
BAR.17, and all of the enormous number of other possible tails.
And perhaps an enumeration facility was deliberately omitted from Rexx
in order not to contradict either this naive expectation or your
considerably more sophisticated one.

Why would you exect an enumeration not to find BAR.17?  It is a
member of the compound variable and defined by the preceding
assignment.

> Rexx is kind of schizophrenic on whether or not a particular variable
> "exists." Yes, I know, the documentation may be precise, but the philosophy
> is still somewhat schizophrenic, IMHO.
> 
It's not only precise, but simple and sane.

    BAR. = "X"

assigns "X" to all possible members of the compound variable;
this is about 1E+600 individual assignments, given that variable
names are limited to 250 characters.  Large numbers shouldn't
drive one to schizophrenia.

    drop BAR.17

undefines one of those members, leaving the (approximately)
1E+600 - 1 remaining members with the value "X".

Still very simple; no schizophrenia.

It's only when one aproaches the facility with a programmer's bias,
and attempts mentally to design an optimization that it becomes
more complicated.  But techniques for manipulating sparse arrays,
even sparse associative arrays, in limited storage are commonplace
and not difficult to implement.

Alas, the original CMS, and later TSO, Rexxen took an approach to
sparse array handling that was needlessly wasteful of storage, perhaps
in the interest of greater speed of execution.  A subsequent attempt
to economize storage use has broken the sparse array handling, even
to the extent of leaving the behavior difficult to predict.  I hope
it will soon be fixed by PTF.

-- gil
-- 
StorageTek
INFORMATION made POWERFUL

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to