Datasheet

CHARACTER CONSTANTS
A character constant is one or more characters enclosed in single quotes, such as
'A', '+', or '\n'. In the mikroC PRO for AVR, single-character constants are of the
unsigned int type. Multi-character constants are referred to as string constants or
string literals. For more information refer to String Constants.
Escape Sequences
A backslash character (\) is used to introduce an escape sequence, which allows a
visual representation of certain nongraphic characters. One of the most common
escape constants is the newline character (
\n).
A backslash is used with octal or hexadecimal numbers to represent an ASCII sym-
bol or control code corresponding to that value; for example, '\x3F' for the ques-
tion mark. Any value within legal range for data type char (0 to 0xFF for the mikroC
PRO for AVR) can be used. Larger numbers will generate the compiler error “Out of
range”.
For example, the octal number \777 is larger than the maximum value allowed
(\377) and will generate an error. The first nonoctal or nonhexadecimal character
encountered in an octal or hexadecimal escape sequence marks the end of the
sequence.
Note: You must use the sequence
\\ to represent an ASCII backslash, as used in
operating system paths.
The following table shows the available escape sequences:
130
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Language Reference
mikroC PRO for AVR
CHAPTER 5