PreviousNext
Help > BASICS > Comments in the Source
Comments in the Source

Comments in Rittle are only presented in the input source script and are stripped by RSC in the output compiled p-code.

There are two types of comments – to the end of the current text line, and multi-line ones spanning from beginning marker to end marker over one or more text lines.

The first type occupies only the text within the current text line. It starts with an apostrophe character ' and ends along with the text line on which it is.

            ' this is a comment to the end of the current line only

The multi-line comments start with a special marker which is an apostrophe character followed immediately by an underscore character. After this point the comment can spread over as many lines as necessary without any limitations. It only ends by reaching a combination opposite to the opening marker – an underscore character, followed by an apostrophe. Since the comment will end at the first found such sequence, nesting of multi-line comments is not allowed.

            '_ this is a comment that can last as many lines as needed

                        This line continues the same comment

                        … and this one as well, until the end marker is reached _'

 

A very specific case is when the developer wants to leave some comments embedded in the output compiled code.

In such cases there should be an exclamation mark immediately following the apostrophe:  '!   or   '!_