Example using Concatenation Operators
/****************************** REXX *******************************/
/* This exec formats data into columns for output.
*/
/*******************************************************************/
sport = 'base'
equipment = 'ball'
column = '
'
cost = 5
SAY sport||equipment column '$' cost
The result of this example is:
baseball
$ 5
Priority of Operators
When more than one type of operator appears in an expression, what operation
does the language processor do first?
IF(A > 7**B) & (B < 3) | (A||B = C) THEN ...
Like the priority of operators within the arithmetic operators, there is an overall
priority that includes all operators. The priority of operators is as follows with the
highest first.
Overall Operator Priority
\ or
¬
- +
Prefix operators
**
Power (exponential)
* / % //
Multiply and divide
+ -
Add and subtract
blank
||
abuttal
Concatenation operators
== = >< etc.
Comparison operators
&
Logical AND
| &&
Inclusive OR and exclusive OR
Thus the previous example presented again below:
IF(A > 7**B) & (B < 3) | (A||B = C) THEN ...
given the following values:
A = 8
B = 2
C = 10
would be evaluated as follows:
1. Convert variables to values
IF(8 > 7**2) & (2 < 3) | (8||2 = 10) THEN ...
2. Compute operations of higher priority within parentheses
Using Expressions
Chapter 3. Using Variables and Expressions
35
Содержание TSO/E REXX
Страница 1: ...z OS TSO E REXX User s Guide SA22 7791 00 ...
Страница 2: ......
Страница 3: ...z OS TSO E REXX User s Guide SA22 7791 00 ...
Страница 10: ...viii z OS V1R1 0 TSO E REXX User s Guide ...
Страница 12: ...x z OS V1R1 0 TSO E REXX User s Guide ...
Страница 14: ...xii z OS V1R1 0 TSO E REXX User s Guide ...
Страница 18: ...xvi z OS V1R1 0 TSO E REXX User s Guide ...
Страница 20: ...2 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 58: ...Tracing Expressions with the TRACE Instruction 40 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 78: ...60 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 86: ...Built In Functions 68 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 128: ...Issuing Other Types of Commands from an Exec 110 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 136: ...Debugging Execs 118 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 170: ...Protecting Elements in the Data Stack 152 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 201: ...Part 3 Appendixes Copyright IBM Corp 1988 2001 183 ...
Страница 202: ...184 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 222: ...Using Variables 204 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 226: ...208 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 238: ...220 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 241: ......