Forth comment

created by ariels
(thing) by ariels (15.7 hr) (print)   (I like it!) Sun Oct 22 2000 at 14:42:56

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!

Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.