Forth supports two styles of comment; the in-line comment starting
with (
and ending with )
, and the comment to the end of
the line line starting with \
. Don’t forget the space after
the starting word.
Comment, usually till the next )
: 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 until the end of line: parse and discard all remaining
characters in the parse area, except while load
ing from a
block: while load
ing from a block, parse and discard all
remaining characters in the 64-byte line.
Equivalent to \
. Used right below the start of a
definition to describe the behaviour of a word. In Gforth’s
source code these comments are those that are then inserted in
the documentation.