-
Notifications
You must be signed in to change notification settings - Fork 5
Comments
To create a single line comment, use the //
notation. Everything after the comment declaration until the end of the line is considered part of the comment, so it is a good idea to put this after your code on that line.
Single line comments are used for short information about a single line of code. For example:
let int32 input; // Stores the user's age
Multi-line and inline comments are created the same way, using /*
and */
. To begin a multi-line/inline comment, use /*
. Everything from the opening of the comment is part of the comment until */
is found.
Inline comments may be used for information about something in a long line of code:
MyFunc(/* age of the user */ input, /* user's name */ name);
Multi-line comments are used for documentation about a function or to explain something else in detail. For example:
/*
This function gets the age of the user and their name, the calls MyFunc to process this data.
Then it prints the information returned by MyFunc to the screen.
*/
let int32 main() = {
...
}
Wiki created by @solar-mist and @Kami