Техническая Спецификация для Mikroelektronika MIKROE-742

Скачать
Страница из 532
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 com-
ments 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 AVR doesn’t allow nested comments. The attempt to nest a
comment like this
{ i { identifier } : word; }
fails, because the scope of the first open brace 
“{” 
ends at the first closed brace
“}”. 
This gives us
: word; }
which would generate a syntax error.
121
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Language Reference
mikroPASCAL PRO for AVR
CHAPTER 5