User manual
mikroPascal PRO for PIC32
MikroElektronika
179
some_string := 'mikro foo';
parses into four tokens, including a single string literal token:
some_string
:=
'mikro foo'
;
Comments
Comments are pieces of a text used to annotate a program, and are technically another form of whitespace. Comments
are for the programmer’s use only. They are stripped from the source text before parsing.
There are two ways to create comments in mikroPascal. You can use multi-line comments which are enclosed with
braces or (* and *):
{ All text between left and right brace
constitutes a comment. May span multiple lines. }
(* Comment can be
written in this way too. *)
or single-line comments:
// Any text between a double-slash and the end of the
// line constitutes a comment spanning one line only.
Nested comments
mikroPascal PRO for PIC32 doesn’t allow nested comments. The attempt to nest a comment like this
{ i { identier } : word; }
fails, because the scope of the rst open brace “{” ends at the rst closed brace “}”. This gives us
: word; }
which would generate a syntax error.