bug fix to use stream
[rrq/rrqforth.git] / adoc / p_right_bracket.adoc
index 4f8589d620fbcb9fd0a58c76eccf75b1bc328387..580d7bfec11e1dea7d0300c3ce80d937824eaa7b 100644 (file)
@@ -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 <<p_immediate,IMMEDIATE>> or a <<p_number,NUMBER>>. 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 ! ;
+****
 ====
-
-