IBM SC34-5764-01 Manual page 141

Cics transaction server for vse/esa
Table of Contents

Advertisement

= > <
(comparison operators)
== >> <<
\= ¬=
>< <>
\> ¬>
\< ¬<
\== ¬==
\>> ¬>>
\<< ¬<<
>= >>=
<= <<=
/= /==
&
(and)
| &&
(or, exclusive or)
Examples:
Suppose the symbol A is a variable whose value is 3, DAY is a variable whose value is Monday, and other
variables are uninitialized. Then:
A+5
->
A-4*2
->
A/2
->
0.5**2
->
(A+1)>7
->
' '=''
->
' '==''
->
' '¬==''
->
(A+1)*3=12
->
'077'>'11'
->
'077' >> '11'
->
'abc' >> 'ab'
->
'abc' << 'abd'
->
'ab ' << 'abd'
->
Today is Day
->
'If it is' day
->
Substr(Day,2,3)
->
'!'xxx'!'
->
'000000' >> '0E0000' ->
Note: The last example would give a different answer if the > operator had been used rather than >>.
Because '0E0000' is a valid number in exponential notation, a numeric comparison is done; thus
'0E0000' and '000000' evaluate as equal. The REXX order of precedence usually causes no
difficulty because it is the same as in conventional algebra and other computer languages. There
are two differences from common notations:
v The prefix minus operator always has a higher priority than the power operator.
v Power operators (like other operators) are evaluated left-to-right.
For example:
-3**2
== 9 /* not -9 */
-(2+1)**2 == 9 /* not -9 */
2**2**3
== 64 /* not 256 */
'8'
'-5'
'1.5'
'0.25'
'0'
/* that is, False */
'1'
/* that is, True */
'0'
/* that is, False */
'1'
/* that is, True */
'1'
/* that is, True */
'1'
/* that is, True */
'0'
/* that is, False */
'1'
/* that is, True */
'1'
/* that is, True */
'1'
/* that is, True */
'TODAY IS Monday'
'If it is Monday'
'ond'
/* Substr is a function */
'!XXX!'
'1'
/* that is, True */
REXX General Concepts
Chapter 12. REXX General Concepts
119

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rexx

Table of Contents