Comment: Difference between revisions

From Wiki of ZZT
Jump to navigation Jump to search
(Created page with "Any ZZT-OOP line beginning with an apostrophe ('''<nowiki>'</nowiki>''') is treated as a '''comment''' and ignored by the interpreter. Comments provide a way for the progr...")
 
m (Not sure how to word this)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:


Comments are used in the implementation of [[zap|zapping and restoring labels]].
Comments are used in the implementation of [[zap|zapping and restoring labels]].
The apostrophe must be the first character on the line. Any leading whitespace will cause the line to be treated as display text. Text placed after commands may be ignored in a manner similar to comments due to how the interpreter parses code lines.


{{ZZT-OOP navbox}}
{{ZZT-OOP navbox}}

Latest revision as of 15:42, 9 February 2021

Any ZZT-OOP line beginning with an apostrophe (') is treated as a comment and ignored by the interpreter. Comments provide a way for the programmer to document their code, or to quickly disable lines of code without deleting the text.

Comments are used in the implementation of zapping and restoring labels.

The apostrophe must be the first character on the line. Any leading whitespace will cause the line to be treated as display text. Text placed after commands may be ignored in a manner similar to comments due to how the interpreter parses code lines.