Comments

Comments are used to explain source code to the human reader of a program. They are composed of plain text and can be inserted anywhere in the source code. The compiler ignores them, hence they don't influence the behavior of the program. There are two kinds of comments: single-line comments and multi-line comments.

Single-line comment

A single-line comment starts with // and ends at the end of the line. It can be placed anywhere in a line.

A line can contain only a single-line comment, or an instruction followed by a single-line comment.

Example 4.3. Single-line comment

// The next instruction is followed by
// a single-line comment 
total_calories = starter_calories + main_calories + dessert_calories // compute total calories on plate