Variable Values

The value of the variable, which is the value the variable name represents, might be categorized as follows:
  • A constant, which is a number that is expressed as:
    • An integer (12)
    • A decimal (12.5)
    • A floating point number (1.25E2)
    • A signed number (-12)
    • A string constant (' 12')
  • A string, which is one or more words that may or may not be within quotation marks, such as:
    This value can be a string.
    'This value is a literal string.'
  • The value from another variable, such as:
    variable1 = variable2

    In the preceding example, variable1 changes to the value of variable2, but variable2 remains the same.

  • An expression, which is something that needs to be calculated, such as:
    variable2 = 12 + 12 - .6         /* variable2 becomes 23.4 */
Before a variable is assigned a value, its value is the value of its own name translated to uppercase. For example, if the variable new has not been assigned a value, then
SAY new
produces
NEW

Reference Reference

Feedback


Timestamp icon Last updated: Tuesday, 7 January 2014


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic/com.ibm.cics.rexx.doc//dfhrx/dfhrx00026.html