title: “Line Comment” author: “laplante@plcb.ca” date: 2023-01-01 version: “1.0.0” section: “1g”
Line Comment — Single-line comments
A line comment begins anywhere on a line with //
and continues until the end of the line.
Line comments are ignored by the compiler and can be used for documentation, explanations, or disabling code temporarily.
⚠️ Special rule: if a line comment contains }}
, it terminates the GOWEB code block and switches back to the display text state.
// Example 1: Standard line comments
Test a line comment
res = {{
a := 5; // Assign 5 to a
// A normal line comment
b := 6; // Assign 6 to b
// End of comment
// Multiple lines
a; b
}}.
// Result:
Test a line comment
res = 56
// Example 2: Line comment with closing braces (}})
Test a line comment
res = {{
a := 5; // Assign 5 to a
// A normal line comment
b := 6; // Assign 6 to b
// End of comment
// Multiple lines }}
a; b
}}.
// Result:
Test a line comment
res =
a; b
}}