X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=adoc%2Fp_right_bracket.adoc;h=218873a0272c87180ae0a2f308938b9ae1b62d18;hb=656f37efbd89db1b1088281047a9633cf74e92ec;hp=4f8589d620fbcb9fd0a58c76eccf75b1bc328387;hpb=fe4d0a01d5703d1ed6fa230679add024b5b2ca5c;p=rrq%2Frrqforth.git diff --git a/adoc/p_right_bracket.adoc b/adoc/p_right_bracket.adoc index 4f8589d..218873a 100644 --- a/adoc/p_right_bracket.adoc +++ b/adoc/p_right_bracket.adoc @@ -1,21 +1,27 @@ +compile.asm: WORD p_right_bracket,']',fasm + anchor:p_right_bracket[] -Word: ] -------- +=== Word: ] ----- -compile.asm: WORD p_right_bracket,']',fasm ----- +.... +Data stack: ( -- ) +.... -"]" (right bracket) is function word that sets the stream evaluation -mode to be compiling. In this mode, words are not executed immediately -after parsing but rather having their CFA placed on the heap. However, -words marked as IMMEDIATE (flags&1 != 0) are executed as if -interpreting mode. Likewise for numbers. +"]" (right bracket) is a function word that sets the stream evaluation +mode to be compiling. In this mode words parsed into CFA pointers +which are placed on the heap in the given order, unless the word is +flagged as <> or a <>. An +immediate word is executed immediately, and a number is parsed and +left on the stack. + +Note that a word is parsed as a number only if it is not found in the +wordlist; i.e., the word list may contain definitions for numbers. -.Execution semantics expressed in RRQFORTH ==== -: [ IMMEDIATE 1 STATE ! ; +.Word: ] +[caption='Definition concept {counter:exec}: '] +---- +: ] 1 STATE ! ; +---- ==== - -