You can use comments in your code to help others understand the intent of the program or function. Comments can be placed anywhere where a space character is allowed, except within character string literals. Comments have no impact on the execution of the program.
Single line comments begin with a double slash //
and end at the end of the line. In single-line comments, the special character combinations (*
and *)
or /*
and */
have no special meaning like in multi-line comments.
Example |
|
Single-line comments are supported by Control FPWIN Pro7 from version 7.6.0.0 onwards. They cause a compiler error in older Control FPWIN Pro7 versions.
Multi-line comments begin either with (*
and end with *)
or with /*
and end with */
. This type of comment can wrap over multiple lines.In multi-line comments, the special character combination //
has no special meaning like in single-line comments.
Example 1 |
|
Example 2 |
|
Example 3 |
|
Example 4 |
|
Multi-line comments using slashes ("/*
") are supported by Control FPWIN Pro7 from version 7.6.0.0 onwards. They cause a compiler error in older Control FPWIN Pro7 versions.
A nested comment is a comment inside another comment. Comments can be nested if the following option setting is enabled: .
With nested comments, you can quickly and easily comment out large blocks of code, even if the code already contains multi-line or single line comments.
Example 1 |
|
Example 2 |
|
Example 1 |
|
Example 2 |
|