Blitz3D+ Language Reference

Comments

You add line comments to your programs using the ';' character. Everything following the ';' until the end of the line is ignored:


; Begin the Redraw Function
Function Redraw()
    RenderWorld
End Function ; Redraw is complete

You can comment out several physical lines using /* and */. The delimiters must be the first non-whitespace characters on their lines:


value=40
/* Temporarily disabled implementation
    value=-1
    This does not need to be valid Blitz source.
*/
value=value+2

Leading whitespace is allowed. Text after an opening /* is ignored. When the outermost */ closes a block, normal source may continue after it on the same line. Putting each delimiter on its own line is recommended. A closing marker on the opening line is not recognized, so /* comment */ begins an unterminated block rather than a one-line comment.

Block comments nest, which makes it safe to disable a region that already contains another block comment:


/*
    old code
    /* nested experiment
        older code
    */
*/

Inside a block, all text is ignored except nested delimiter lines. An unmatched */ or a block that reaches the end of its file without a matching closer is a compiler error. A block cannot begin in one file and end in another.

Semicolon and block comments are available in both Original and Extended language modes.

Open the block comment example