Comments & Delineation: Difference between revisions
From TrainzOnline
Jump to navigationJump to search
m 1 revision |
m Add links between language reference pages |
||
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
* [[TrainzScript Language Reference]] | |||
** [[Comments & Delineation]] | |||
** [[TrainzScript Keywords]] | |||
** [[Operators]] | |||
** [[Types]] | |||
<br /> | |||
==Comments== | ==Comments== | ||
{{MethodHeader|//}} | {{MethodHeader|//}} | ||
| Line 27: | Line 33: | ||
{{MethodHeader|{ };}} | {{MethodHeader|{ };}} | ||
*Delineates the extent of a class declaration. | *Delineates the extent of a class declaration. | ||
=Categories= | |||
[[Category:TrainzScript]] | |||
Latest revision as of 14:08, 28 December 2020
Comments
//
- Single line comment, text before the next carriage return will be ignored by the compiler.
/* */
- Block comment.
- Text between the two character pairs '/*' and '*/' will be ignored.
- This convention can be used to temporarily disable the execution of sections of code.
- Block comment tags cannot be nested but they can enclose single line comments.
Delineation
:
- Marks the end of a label declaration.
- see on, switch, case, default, label
;
- Marks the end of a statement.
{ }
- Delineates the extent of a compound statement or method declaration.
{ };
- Delineates the extent of a class declaration.