Undefined values: Difference between revisions

m
→‎{{header|REXX}}: used gooder Unglish, added/changed whitespace and comments.
m (→‎{{header|REXX}}: used gooder Unglish, added/changed whitespace and comments.)
Line 1,019:
 
=={{header|REXX}}==
<lang rexx>/*REXX program to test if a (REXX) variable is defined or not defined. */
tlaloc = "rain god of the Aztecs." /*assign a value to the Aztec rain god.*/
/*check if the rain god is defined. */
y= 'tlaloc'
if symbol(y)=="VAR" then say y ' is defined.'
else say y "ainisn't defined."
 
/*check if the rain fire god is defined. */
tlaloc = "rain god of the Aztecs."
 
y= 'xiuhtecuhtli' /*assign a value to the Aztec file god.*/
if symbol(y)=="VAR" then say y ' is defined.'
else say y "ainisn't defined."</lang>
 
/*check if the rain god is defined.*/
y='tlaloc'
if symbol(y)=="VAR" then say y 'is defined.'
else say y "ain't defined."
 
drop tlaloc /*un-defineun─define the TLALOC REXX variable. */
 
/*check if the fire rain god is defined. */
y= 'tlaloc'
 
if symbol(y)=="VAR" then say y ' is defined.'
y='xiuhtecuhtli'
if symbol(y)=="VAR" then else say y "isn'ist defined.'"
else say y "ain /*stick a fork in it, we'tre definedall done." */</lang>
 
 
drop tlaloc /*un-define the TLALOC variable. */
/*check if the rain god is defined.*/
y='tlaloc'
if symbol(y)=="VAR" then say y 'is defined.'
else say y "ain't defined."</lang>
'''output'''
<pre>
<pre style="overflow:scroll">
tlaloc is defined.
xiuhtecuhtli ainisn't defined.
tlaloc ainisn't defined.
</pre>