Comments
comment | = | single-comment | multi-comment |
single-comment | = | ’// ’ {printable } end-of-line |
multi-comment | = | ’/* ’ {printable } [multi-comment {printable }] ‘*/ ’ |
end-of-line | = | newline | carriage-return | end-of-file |
Comments are blocks of text that are used as code documentation and are ignored by the SkookumScript parser which considers them to be no more than whitespace. While the computer ignores them, comments are essential for us humans to make notes in code to other users or as an aid to memory to your future self. You can also use comments to have the parser skip over code that you don’t want to be present in the runtime though you want to keep it around for reference.
Comments are ignored by the compiler and written to help programmers to better understand the code. Comments in SkookumScript are very similar to those in C++ except that multi-line comments in SkookumScript can be nested inside one another.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|