Formal Definition
Comments provide a means of describing or documenting a model.
Simplified Syntax
// a single line with comments
/* multiple lines
containing comments */
Description
Comments can be used for describing models. There are two ways of using comments: in a single line or in multiple lines. It is illegal to use '/*' characters without matching '*/' characters. The multiple line comments cannot be nested.
Examples
Example 1
// this is the first line of a single line comment
// this is the second line of a single line comment
Example of a single line comment.
Example 2
/* this is the first line of a multiple line comment
this is the second line of a multiple line comment
*/
Example of a multiple line comment.
Important Notes
-
Using the '/*' characters without the matching '*/' characters is not allowed
-
The multiple line comments cannot be nested
No comments:
Post a Comment
Please provide valuable comments and suggestions for our motivation. Feel free to write down any query if you have regarding this post.