User manual
181
mikoPascal PRO for dsPIC30/33 and PIC24
MikroElektronika
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 dsPIC30/33 and PIC24 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.
Tokens
Token is the smallest element of a mikroPascal PRO for dsPIC30/33 and PIC24 program, meaningful to the compiler.
The parser separates tokens from the input stream by creating the longest token possible using the input characters
in a left–to–right scan.
mikroPascal PRO for dsPIC30/33 and PIC24 recognizes the following kinds of tokens:
- keywords
- identiers
- constants
- operators
- punctuators (also known as separators)