[Contents] · [Home] · [Mail]

SALIERI Language - MACRO

Type:
MACRO: integer x expr_block -> function

Call syntax:
MACRO(nrOfParams, macroBody)

Description:
Returns an nrOfParams-place macro which is defined by block macroBody.

Macros are a variant of functions; they behave identically in all respects despite that they don't generally have local variables. Only the variables named $... are local, among these the actual parameters of the macro. Thus, within macro-bodies, global variables can be modified.

Attention!

Example:
> x := 3;
> f := MACRO(2, `x := 1; write("x=",x))
> f(0);
x=3
x
Result = 3

See also: FUNC, return.


[Contents] · [Home] · [Mail]
© sic!systems, page frame designed by hh; this page has been automatically generated from the SALIERI Documentation Database.