View previous topic :: View next topic |
Author |
Message |
RoyKMathur Beginner
Joined: 05 Jan 2012 Posts: 47 Topics: 11
|
Posted: Fri Mar 14, 2014 1:02 pm Post subject: Is There a Way to See Whether a Variable is Defined? |
|
|
I have a very large and overly complicated rexx program where the code is combining multiple variable values into a stem name. Is there a way to determine whether the variable name is already defined? For example:
If variableexists(env.table.index) then ... |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
RoyKMathur Beginner
Joined: 05 Jan 2012 Posts: 47 Topics: 11
|
Posted: Mon Mar 17, 2014 9:03 am Post subject: |
|
|
Thanks kolusu! |
|
Back to top |
|
 |
arnold57 Beginner
Joined: 01 Oct 2004 Posts: 30 Topics: 0
|
Posted: Mon Mar 31, 2014 3:31 pm Post subject: |
|
|
Why not use SYMBOL('env.table.index') which will be 'VAR' if defined and 'LIT' if not.
P.S. For me VALUE(VALUE(CKSTR)) yields 'ROY' in Kolusu's example. |
|
Back to top |
|
 |
RoyKMathur Beginner
Joined: 05 Jan 2012 Posts: 47 Topics: 11
|
Posted: Thu Apr 03, 2014 12:37 pm Post subject: |
|
|
Nice solution! |
|
Back to top |
|
 |
|
|