Source Files and Comments

LunarBasic source code is read one line at a time. Before parsing begins, blank lines and comments are removed so the parser can focus on real code.

Back to Language Reference


How Source Files Are Read

Whitespace

This means you can space code out for readability without changing how it is parsed.

Apostrophe Comments

An apostrophe starts either a full-line comment or an inline comment.

' full line comment counter = counter + 1 ' inline comment

Anything after the apostrophe on the same line is ignored.

Block Comments

Block comments start with Rem and end with End Rem.

Rem this text is ignored End Rem