TO

Interpretation:

( i * x "<spaces>name" -- )

Skip leading spaces and parse name delimited by a space. Perform the "TO name run-time" semantics given in the definition for the defining word of name. An ambiguous condition exists if name was not defined by a word with "TO name run-time" semantics.

Compilation:

( "<spaces>name" -- )

Skip leading spaces and parse name delimited by a space. Append the "TO name run-time" semantics given in the definition for the defining word of name to the current definition. An ambiguous condition exists if name was not defined by a word with "TO name run-time" semantics.

Note:

An ambiguous condition exists if any of POSTPONE, [COMPILE], ' or ['] are applied to TO.

See:

Rationale:

Typical use: x TO name

Some implementations of TO do not parse; instead they set a mode flag that is tested by the subsequent execution of name. Standard programs must use TO as if it parses. Therefore TO and name must be contiguous and on the same line in the source text.

Testing:

ContributeContributions