Grouped expressions



next up previous contents
Next: Control statements Up: More language features. Previous: More language features.

Grouped expressions

S-PLUS is an expression language in the sense that its only command type is a function or expression which returns a result. Even an assignment is an expression whose result is the value assigned, and it may be used wherever any expression may be used; in particular multiple assignments are possible.

Commands may be grouped together in braces, '173expr; expr;...; expr'175, in which case the value of the group is the result of the last expression in the group evaluated. Since such a group is also an expression it may, for example, be itself included in parentheses and used a part of an even larger expression, and so on.



Erik Moledor
Tue Jan 31 21:02:18 EST 1995