On Thu, 13 Jun 2013 08:56:56 -0500, Elardus Engelbrecht wrote:

>John McKown wrote:
>
>>Questions: If I decide on making the above an array: What if STEM.2 doesn't 
>>exist? What if STEM.100 exists?
>
>Easy, if you refer to an UNASSIGNED stem item, the default value is 'empty' if 
>you try to refer to it.
> 
Not so easy.  It assumes that the assignment "hole. = 'empty'" has been
performed, as in the example.  And that 'empty' can't otherwise legitimately
occur in the data.

>Do this on TSO to see (example from REXX Ref):
>
>/* rexx */                        
>hole.  = "empty"                  
>hole.9 = "full"                   
>say  hole.1  hole.mouse  hole.9   
>
>Result: empty empty full  
> 
Rexx has the nice function, SYMBOL() to tell whether a variable has been
assigned to.  Many langages lack this (has PL/I anything similar?)  I've
struggled with an interface (in C, I believe; OCO) to an SQL DB which
supplies an empty string as the value of any empty cell.  This makes it
impossible to distinguish between an empty cell and a cell containing a
null string.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to