Undefined values: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: removed first and last blank lines. -- ~~~~)
Line 866: Line 866:


=={{header|REXX}}==
=={{header|REXX}}==
<lang rexx>/*REXX program to test if a variable is defined. */
<lang rexx>
/*REXX program to test if a variable is defined. */


tlaloc = "rain god of the Aztecs."
tlaloc = "rain god of the Aztecs."
Line 889: Line 888:
y='tlaloc'
y='tlaloc'
if symbol(y)=="VAR" then say y 'is defined.'
if symbol(y)=="VAR" then say y 'is defined.'
else say y "ain't defined."
else say y "ain't defined."</lang>
'''output'''
</lang>
<pre style="overflow:scroll">
Output:
<pre style="height:30ex;overflow:scroll">
tlaloc is defined.
tlaloc is defined.
xiuhtecuhtli ain't defined.
xiuhtecuhtli ain't defined.