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

  1. 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
  2. What is the result (0 or 1) of the following expressions?
    1. "Apples" = "Oranges"
    2. " Apples" = "Apples"
    3. " Apples" == "Apples"
    4. 100 = 1E2
    5. 100 \= 1E2
    6. 100 \== 1E2
ANSWERS
  1. The following sentences appear.
    1. Today's lunch cost the same or less than yesterday's.
    2. Today's lunch cost the same or less than yesterday's.
    3. Today's lunch cost more than yesterday's.
  2. The expressions result in the following. Remember 0 is false and 1 is true.
    1. 0
    2. 1
    3. 0 (The first " Apples" has a space.)
    4. 1
    5. 0
    6. 1

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014