On 11/15/2010 12:05 PM, Shmuel Metz (Seymour J.) wrote:
In<[email protected]>, on 11/06/2010
at 04:04 PM, "Joel C. Ewing"<[email protected]> said:
I believe that REXX only directly supports one of those two
mechanisms, namely the symbol table lookup and not true indexed
arrays.
Correct, although Object Oriented Rexx (OOREXX) has true arrays.
The distinction made is
rather one of whether the original variable domains consist of
consecutive integer values or not.
There's also the issue of trapping subscripts that are out of range.
But, functionally,
indexed arrays are just a special subset of symbol table lookup:
Not in a language that includes bounds checking.
Not really. I am talking about algorithmic concepts, not about specific
programming language implementations of those concepts.
You are unnecessarily restricting the concept of a symbol table mapping
function. There is no reason why a symbol table mapping function that
computes a table offset as a linear function of integer indices could
not and should not also detect and trap index values that are outside
the domain of the function. Just because some particular programming
language may or may not directly support this does not preclude it from
being part of the algorithmic concept. Implementation just takes more
effort if this feature is required and direct language support is lacking.
--
Joel C. Ewing, Fort Smith, AR [email protected]
----------------------------------------------------------------------
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