-
Notifications
You must be signed in to change notification settings - Fork 2
The Comment Block
Q is relatively easy to understand just by looking at the code, so commenting in Q is not a very important practice of writing code in Q, but it is still important to understand how to comment, because you will need to comment parts of your code - mostly for documentation purposes when working with others on your projects - however sometimes you might want to make notes to yourself about what specific parts of your programs do.
Unlike some languages where you can create multi line comments, Q currently only allows single line comments which are ignored by the compiler and can obviously span multiple lines by creating new comments on each line that you want to have a comment on. To make a comment, you can use the syntax shown below:
## This is a comment in Q.
Unlike the Shell scripting languages and probably many others, you will need to use two #
symbols for the compiler to recognise your comment and ignore it. This is because Q requires a single #
symbol for other parts of the code, not commenting.