This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
ch02-getting-going.html [2017/08/19 22:58] mithat [Comments] |
ch02-getting-going.html [2017/08/19 23:15] mithat [Comments] |
||
---|---|---|---|
Line 109: | Line 109: | ||
However, there will be times when you will want to include text in your code just to help human readers. For example, you might want to include some information about who authored the program, when it was written, licensing information, etc. That is what **comments** are for. | However, there will be times when you will want to include text in your code just to help human readers. For example, you might want to include some information about who authored the program, when it was written, licensing information, etc. That is what **comments** are for. | ||
- | There are three ways to write comments in Processing: the plain old comment, the multi line comment, and the doc comment. | + | There are three ways to write comments in Processing: the "standard" comment, the multi line comment, and the doc comment. |
- | === the plain old comment === | + | === the "standard" comment === |
The most common syntax for creating comments in Processing is to use a double forward slash: ''%%//%%''. Anything that comes after a double slash up to the end of the line is a comment and will be ignored by the Processing compiler. Here a version of the ''cranberries2.pde'' program with some added some comments to identify the author and other information and explain some of the code: | The most common syntax for creating comments in Processing is to use a double forward slash: ''%%//%%''. Anything that comes after a double slash up to the end of the line is a comment and will be ignored by the Processing compiler. Here a version of the ''cranberries2.pde'' program with some added some comments to identify the author and other information and explain some of the code: | ||