4.1 Statements versus Expressions

A functional program in Oz is sequence of statements. Statements describe actions such as showing a value or assigning a value to a variable. The following program, for instance, consists of two statements:

{Inspect welcome}
{Inspect 7*8-14}

Values are descibed by expressions that may be nested such as 3+4*25. Expressions are to be evaluated to values. Note that Oz's statements do not have values themselves in contrast to Oz's expressions.

Later on we will also see expressions that contain statements. The actions of these statements are to be executed during evaluation.


Denys Duchier, Claire Gardent and Joachim Niehren
Version 1.3.99 (20050412)