Characters within a program

To prevent translation of alphabetic characters in a program to uppercase, simply enclose the characters in single or double quotation marks. The language processor does not change numbers and special characters, regardless of whether they are in quotation marks. Suppose you use a SAY instruction with a phrase containing a mixture of alphabetic characters, numbers, and special characters; the language processor changes only the alphabetic characters.
SAY The bill for lunch comes to £123.51!
results in:
THE BILL FOR LUNCH COMES TO £123.51!
(This example assumes none of the words are the names of variables that have been assigned other values.)
Quotation marks ensure that information in a program is processed exactly as typed. This is important in the following situations:
  • For output that must be lowercase or a mixture of uppercase and lowercase.
  • To ensure that commands are processed correctly. For example, if a variable name in a program is the same as a command name, the program can end in error when the command is issued. It is a good programming practice to avoid using variable names that are the same as commands and to enclose all commands in quotation marks.

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/dfhrx00019.html