/ interpret /

INTERPRET

description:


INTERPRET ( i*x -- j*x ) ( changes >IN )

Repeat the steps specified in the section
3.4 "The Forth text interpreter"
of the ANS Forth standard until the parse area is empty
(or an ambiguous condition exists).
When the parse area becomes empty, return control to the calling routine.
The stack effect ( i*x -- j*x ) is due to the interpreted text.


Notes:


The text interpretation starts with the current input source state
and finishes when the parse area is empty. No attempts to refill the
input source buffer is made.

The word INTERPRET is not responsible for restoration of any input source
specification.


Origin:

Forth-83.


Acceptance:

Widely used.


Usage example:


: a{ ( start interactive assembly mode ) ;
: }a ( end interactive assembly mode, execute the code ) ;
: /a a{ INTERPRET }a ;

The word /a is used from the command line as

/a spush mova (a1)+

which is equivalent to

a{ spush mova (a1)+ }a

The word INTERPRET could be replaced by the phrase
SOURCE >IN @ /STRING EVALUATE SOURCE NIP >IN !
(note that for block interpretation the word \ is
not equivalent to SOURCE NIP >IN ! ).


generated Wed Jul 23 02:53:35 2003mlg