display | more...

In Forth, comments are written like this:

2 2 ( Now add these numbers...) +
The English in parentheses is a comment. The space after `(' is important! ( is a Forth word (marked IMMEDIATE) that discards the rest of the line, till the first `)'. Without the space, Forth would look for a word `(Now' instead.

Like everything else in this language, comments can be implemented by the user. Try that in your favourite high level language!

Log in or register to write something here or to contact authors.