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 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.

Comment Examples
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
// This is an example of a single line comment.
// It continues from its start until the end of the line ->
do_this

// It can be on its own line
do_that  // or at the end of other code

some_code

/* This is an example of a multi-line comment.
   It can be a single line, multiple lines or used
   in the middle of code just like other whitespace. */

if /*like this*/ test
  [
  do_this
  do_that
  ]

/* [B1] Multi-line comments
do_this

  /* [B2] can nest other comment blocks
  do_that
  do_stuff // Including single line comments
  */  // end of [B2]

do_other
*/  // end of [B1]

do_end