X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=adoc%2Fp_right_bracket.adoc;h=580d7bfec11e1dea7d0300c3ce80d937824eaa7b;hb=1fb804b8f6a4bd907491e5d64d4a16e190e64c17;hp=4f8589d620fbcb9fd0a58c76eccf75b1bc328387;hpb=b7da3f7bbd1cb10241163abdb950472e539e796d;p=rrq%2Frrqforth.git diff --git a/adoc/p_right_bracket.adoc b/adoc/p_right_bracket.adoc index 4f8589d..580d7bf 100644 --- a/adoc/p_right_bracket.adoc +++ b/adoc/p_right_bracket.adoc @@ -1,21 +1,26 @@ +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 ! ; +.Definition concept for ] +**** +: ] 1 STATE ! ; +**** ==== - -