Level 0, lesson 6

# 0.6 Adding comment

Adding comment is very simple. In fact, there are two ways to add comment in 4tH. That is because we like programs with a lot of comment.

The first form you've already encountered. Let's say we want to add comment to this little program:

         : *. * . ;
         2 3 *.

So we add our comment:

         : *. * . ;     This will multiply and print two numbers
         2 3 *.

4tH will not understand this. It will desperately look for the words 'this', 'will', etc. However the word '\' will mark everything up to the end of the line as comment. So this will work:

         : *. * . ;     \ This will multiply and print two numbers
         2 3 *.

There is another word called '(' which will mark everything up to the next ')' as comment. Yes, even multiple lines. Of course, these lines may not contain a ')' or you'll make 4tH very confused. So this comment will be recognized too:

         : *. * . ;     ( This will multiply and print two numbers)
         2 3 *.

Note that there is a whitespace-character after both '\' and '('. This is mandatory!