OS/2 Procedures Language 2/REXX


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


Using Comparisons


The following procedure, TF.CMD, uses comparisons and an equal expression 
to determine if numeric expressions are true or false. 

/* Determine if expression is true or false  */
/* 1 is true; 0 is false                     */
a = 4
b = 2
c = a > b
SAY 'The result of' a '>' b 'is' c
c = a < b
SAY 'The result of' a '<' b 'is' c
c = a = b
SAY 'The result of' a '=' b 'is' c
EXIT

When you run the procedure, it gives the following results: 


[C:\]TF
The result of 4 > 2 is 1
The result of 4 < 2 is 0
The result of 4 = 2 is 0

[C:\]
  

Inf-HTML End Run - Successful