Expressions

An expression is something that can be computed. In your z/VM: REXX/VM Reference, you will find model instructions like:
symbol = expression
SAY expression
IF expression THEN ...
When you are writing instructions in one of your programs, you can replace the word expression with any expression that can be evaluated. Here are some expressions:
2 + 2
/* Its value is "4" */
 
 
"A" "B" "C"
/* Its value is "A B C" */
 
 
5 < 7
/* Its value is "1", because */
 
/* the comparison is true */
In this chapter we discuss how to write expressions that the language processor can compute. The rules that the language processor uses for evaluating an expression (that is, finding its value) will be explained. The chapter is divided into sections, namely:
  • Operators
  • True and False
  • Functions
  • Loops (see note below)
  • Arithmetic
  • Groups (see note below)
  • Text
  • Comparisons
  • Conversion and translation.
Each section has its own introduction describing what is in it and advising you what to leave until Reading 2 or Reading 3.
Note: This chapter includes brief discussions on Loops and Groups of Instructions. These topics are included here so that you will be able to understand some of the examples given later in this chapter. There are further discussions on both topics later in the book (Loops, Groups of Instructions in Selection).