Writing Comments

Navigation:  Language Reference > Introduction >

Writing Comments

Previous pageReturn to chapter overviewNext page

20-sim gives you several options to create comments in a model. You can use each option add explanatory text to your model or to exclude ("comment out") certain parts of your model for testing and debugging purposes.

Block Quotes ("...")

You can enclose a block of text between quotes ("). This method makes it easy to write a comment over multiple lines:

 

"This is a line of sample code that shows you how to

use the 20-sim comments"

 

Programming (/*...*/)

You can enclose a block of text between the constructs /* and */. This method is used often in programming and also allows to write a comment over multiple lines:

 

/*This is a line of sample code that shows you how to

use the 20-sim comments*/

 

Single Line Comment (//...)

A option often used in programming is to insert // into a line. The compiler ignores everything to the right of the double slashes on that line only.

 

// This is a line of sample code showing the

// 20-sim comments.

 

You can begin comments anywhere in a model. 20-sim will automatically recognize comments and color it green.