Comments
Comments allow you to add notes and documentation to your code. They are ignored by the interpreter and have no effect on program execution.
Single-Line Comments
DLiteScript supports single-line comments using //.
Everything after // on that line is treated as a comment.
Syntax
| |
Examples
Full-Line Comments
| |
Inline Comments
Comments can appear at the end of a line of code:
| |
Multiple Comments
You can have multiple comment lines:
| |
Commented Code
Comments are often used to temporarily disable code:
| |
Comments in Strings
The // sequence inside a string literal is not treated as a comment:
| |
Output: // This is not a comment