| home | contents | previous | next page | send comment | send link | add bookmark |

Programmer's Guide to the Zeno Interpreter

Chapter 3.
Expressions and assignment statements

The use of data in expressions and in assignment statements is the focus of this chapter. Expressions are used as arguments in many program statements, so you will see them again in later chapters.

Expressions

An expression returns a numerical value, a boolean value, an enumerated value, a character, or a string. They do not return entire arrays, records, or unions. An expression can be one of:

  1. name
  2. literal constant
  3. expression operator expression
  4. operator expression
  5. ( expression )

Form (1) must represent a value from one of the standard data types or an enumeration. The name may represent a constant, an initialized variable, or a function. Form (2) can represent any of the standard types. Forms (3), (4), and (5) allow evaluation of complex arithmetic and boolean expressions.

string expressions

Zeno uses the following operator in string expressions:

    &           string concatenation

The string expression:

    "How " & "now " & "brown " & "cow?"

results in:

    "How now brown cow?"

| home | contents | previous | next page | send comment | send link | add bookmark |