expand

Syntax

%expand(macro-text)

Description

%expand expands its argument as a macro. This is VERY unsafe to do with user-supplied content, please use safe-expand instead.

Typical usage for %expand is to partition code into libraries and then load them as needed, for example %expand(%include(/path/to/file)) will evaluate the contents of that file, potentially creating or redefining functions.

Example

%set(x,%%iadd(1,1))

The result of %x% is %expand(%x%).

-----

The result of %iadd(1,1) is 2.

See Also

safe-expand | invoke