This is a string.
In the first example, the comma at the end of line 1 adds a space when the two
lines are concatenated for display. In the second example, the space between the
two separate strings is preserved when the line is displayed.
Continuing a literal string without adding a space
If you need to continue an instruction to a second or more lines but do not want
REXX to add spaces when the line appears on the screen, use the concatenation
operand (two single OR bars, ||).
SAY 'This is an extended literal string that is bro'||,
'ken in an awkward place.'
This example appears on the screen as one line without adding a space within the
word “broken”.
This is an extended literal string that is broken in an awkward place.
Also note that the following two instructions are identical and yield the same result
when displayed on the screen:
SAY 'This is' ||,
'a string.'
is functionally identical to:
SAY 'This is' || 'a string.'
These examples appear on the screen as:
This isa string.
In the first example, the concatenation operator at the end of line 1 causes the
deletion of any spaces when the two lines are concatenated for display. In the
second example, the concatenation operator also concatenates the two strings
without space when the line is displayed.
Ending an instruction
The end of the line or a semicolon indicates the end of an instruction. If you put
more than one instruction on a line, you must separate each instruction with a
semicolon. If you put one instruction on a line, it is best to let the end of the line
delineate the end of the instruction.
SAY 'Hi!'; say 'Hi again!'; say 'Hi for the last time!'
This example appears on the screen as three lines.
Hi!
Hi again!
Hi for the last time!
The following example demonstrates the free format of REXX.
Syntax of REXX Instructions
Chapter 2. Writing and Running a REXX Exec 11