On Wed, 18 Mar 2009 00:11:35 +0200, Binyamin Dissen wrote:

>On Tue, 17 Mar 2009 22:09:15 -0000 Terry Sambrooks wrote:
>
>:>The question I have been asked relates to whether REXX supports
>:>multi-dimensional arrays. There is a lot of discussion in the manuals about
>:>single dimension arrays a.k.a. STEM variables, but additional dimensions are
>:>not covered which leads me to conclude that multi-dimensional arrays are not
>:>supported.
>
True, they are not.

>Why can't stems be multi-dimensional?
>
>STEM.x.y.z
>
Which is equivalent to:

    I = x'.'y'.'z
    STEM.I

But this suffers an ambiguity.  Consider:

    I = 'A.B'
    J = 'C'

    X = 'A'
    Y = 'B.C'

Then STEM.I.J and STEM.X.Y refer to the same variable,
even though I<>X and J<>Y.  When this occurs, admittedly
seldom but not never, the astonishment factor is likely
to be enormous.

FORTRAN introduces a similar ambiguity with its flattening
of subscripts.

-- gil

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

Reply via email to