z/OS TSO/E REXX User's Guide
Previous topic
|
Next topic
|
Contents
|
Contact z/OS
|
Library
|
PDF
Exercises - Using Comparison Expressions
z/OS TSO/E REXX User's Guide
SA32-0982-00
In the preceding example of using a comparison expression, what appears on the screen when you respond to the prompts with the following lunch costs?
Yesterday's Lunch
Today's Lunch
4.42
3.75
3.50
3.50
3.75
4.42
What is the result (0 or 1) of the following expressions?
"Apples" = "Oranges"
" Apples" = "Apples"
" Apples" == "Apples"
100 = 1E2
100 \= 1E2
100 \== 1E2
ANSWERS
The following sentences appear.
Today's lunch cost the same or less than yesterday's.
Today's lunch cost the same or less than yesterday's.
Today's lunch cost more than yesterday's.
The expressions result in the following. Remember 0 is false and 1 is true.
0
1
0 (The first " Apples" has a space.)
1
0
1
Parent topic:
Comparison Operators
Copyright IBM Corporation 1990, 2014