IBM SC34-5764-01 Manual de usuario Pagina 46

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 481
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 45
For example, if A=4and Z=3, then the results of the previous comparison questions are:
(A=Z) Does4=3? 0 (False)
(A>Z) Is4>3? 1 (True)
(A<Z) Is4<3? 0 (False)
The more commonly used comparison operators are as follows:
Operator
Meaning
= Equal
== Strictly Equal
\= Not equal
\== Not strictly equal
> Greater than
< Less than
>< Greater than or less than (same as not equal)
>= Greater than or equal to
\< Not less than
<= Less than or equal to
\> Not greater than
Note: The NOT character (¬) is synonymous with the backslash (\). You can use the two characters
interchangeably according to availability and personal preference. This book uses the backslash (\)
character.
The Strictly Equal and Equal Operators
When two expressions are strictly equal, everything including the blanks and case (when the expressions
are characters) is exactly the same.
When two expressions are equal, they are resolved to be the same. The following expressions are all
true.
'WORD' = word /* returns 1 */
'word ' \== word /* returns 1 */
'word' == 'word' /* returns 1 */
4e2 \== 400 /* returns 1 */
4e2 \= 100 /* returns 1 */
Using Comparison Expressions
You often use a comparison expression in an IF...THEN...ELSE instruction. The following example uses an
IF...THEN...ELSE instruction to compare two values. For more information about this instruction, see
section “IF...THEN...ELSE Instructions” on page 33.
Using Variables and Expressions
24
CICS TS for VSE/ESA: REXX Guide
Vista de pagina 45
1 2 ... 41 42 43 44 45 46 47 48 49 50 51 ... 480 481

Comentarios a estos manuales

Sin comentarios