MULTI_EXPR Type (Structure)

estack.h, homescr.h, vat.h

typedef struct {
unsigned short Size;
ESQ Expr[];
} MULTI_EXPR;

Describes a multi-expression, which is processed as a separate expression stack.

MULTI_EXPR is a structure describing a multi-expression. It can be applied to the contents of every VAT symbol, because all symbols contain size bytes at the beginning. It can also be used to describe a multi-expression passed to Parse2DMultiExpr, or used by the FIFO elements in homescr.h.

The Size field contains the size of the data in Expr, in bytes (but note that ESQ is one byte large). For real multi-expressions, Expr should start with ENDSTACK_TAG, followed by the actual expressions. These expressions are processed from the end to the beginning, as usual (using the Size field to find the end). So the last quantum needs to be a tag from the Tags enum.

Multiple expressions are separated with NEXTEXPR_TAG, or with NEWLINE_TAG (only in TI-Basic programs and functions).

If you have a handle to a MULTI_EXPR structure, you can use the HToESI function to get a pointer to the last quantum (i.e. the tag).


See also: top_estack, HToESI, Parse2DMultiExpr, homescr.h