Skip to content

Comments

Comments are used to make your code more human-readable. They are ignored by the computer. SurgeScript allows two kinds of comments: single-line comments and multi-line comments.

Single-line comments

Single-line comments start with a //. Example:

// This line has no effect on the code (it's just for improved readability)
x = 3 + 4; // x is now 7

Multi-line comments

Multi-line comments start with a /* and end with a */. Example:

/*
 * Comments can, but don't have to, take
 * multiple lines if you use this form.
 */
x = 3 + 4; /* x is now 7 */

Comments of this form cannot be nested.