progn {!statement [!statement] ...} prog1 {!statement [!statement] ...}
progn: the return value of the last statement.
prog1: the return value of the first statement.
These two syntactical elements are not statements, but they transform a group of one or more statements into a single Gamma expression. The value of the resulting expression is the return value of the last statement for progn or the first statement for prog1. This is useful for performing complex actions where only a single expression is permitted, such as in a callback. No new scope is entered for a progn or a prog1.
The syntax of these unique elements uses curly braces { }, but don't confuse them with statements. They behave exactly like expressions. |
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.