EasyManuals Logo

IBM TSO/E REXX User Manual

IBM TSO/E REXX
242 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #53 background imageLoading...
Page #53 background image
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

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM TSO/E REXX and is the answer not in the manual?

IBM TSO/E REXX Specifications

General IconGeneral
BrandIBM
ModelTSO/E REXX
CategoryComputer Hardware
LanguageEnglish

Related product manuals