Comment: Difference between revisions
Jump to navigation
Jump to search
m (Not sure how to word this) |
No edit summary |
||
| Line 1: | Line 1: | ||
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 programmer to document their code, or to quickly disable lines of code without deleting the text. | 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 programmer to document their code, or to quickly disable lines of code without deleting the text. | ||
A line beginning with an apostrophe ('''<nowiki>'</nowiki>''') is also acts as '''zapped label''', due to the implementation of [[zap|#zap and #restore]]. For some purposes, it maybe be useful to "pre-zap" a label in code. | |||
The apostrophe must be the first character on the line. Any leading whitespace will cause the line to be treated as display text | 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 ZZT-OOP commands may be ignored in a manner similar to comments due to how the interpreter parses code lines. | |||
{{ZZT-OOP navbox}} | {{ZZT-OOP navbox}} | ||
Revision as of 01:33, 24 December 2025
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.
A line beginning with an apostrophe (') is also acts as zapped label, due to the implementation of #zap and #restore. For some purposes, it maybe be useful to "pre-zap" a label in code.
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 ZZT-OOP commands may be ignored in a manner similar to comments due to how the interpreter parses code lines.
| ZZT-OOP | |
|---|---|
| Prefixes |
|
| Messages | |
| Directions | |
| Flags | |
| Commands | |