Node:Comments, Next:Boolean Flags, Previous:Case insensitivity, Up:Words
Forth supports two styles of comment; the traditional in-line comment,
( and its modern cousin, the comment to end of line;
Comment, usually till the next
(compilation 'ccc<close-paren>' -- ; run-time -- core,file ``paren''
): parse and discard all subsequent characters in the parse area until ")" is encountered. During interactive input, an end-of-line also acts as a comment terminator. For file input, it does not; if the end-of-file is encountered whilst parsing for the ")" delimiter, Gforth will generate a warning.
Comment till the end of the line if
\compilation 'ccc<newline>' -- ; run-time -- core-ext,block-ext ``backslash''
BLKcontains 0 (i.e., while not loading a block), parse and discard the remainder of the parse area. Otherwise, parse and discard all subsequent characters in the parse area corresponding to the current line.
\Gcompilation 'ccc<newline>' -- ; run-time -- gforth ``backslash-gee''
\but used as a tag to annotate definition comments into documentation.