English
Language : 

CC78K4 Datasheet, PDF (48/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 2 CONSTRUCTS OF C LANGUAGE
(Integer constant)
(Representable type)
• Unsuffixed decimal number .................................. int, long int, unsigned long int
• Unsuffixed octal, hexadecimal number................. int, unsigned int, long int, unsigned long int
• Suffixed u or U...................................................... unsigned int, unsigned long int
• Suffixed l or L........................................................ long int, unsigned long int
• Suffixed u or U, and suffixed l or L ....................... unsigned long int
2.4.3 Enumeration constants
Enumeration constants are used for indicating an element of an enumeration type variable, that is, the value of an
enumeration type variable that can have only a specific value indicated by an identifier.
The enumeration type (enum) is whichever is the first type from the top of the list of three types shown below that
can represent all the enumeration constants. The enumeration constant is indicated by the identifier.
• signed char
• unsigned char
• signed int
It is described as ‘enum enumeration type {list of enumeration constant}’.
Example enum months {January = 1, February, March, April, May};
When the integer is specified with =, the enumeration variable has the integer value, and the
following value of enumeration variable has that integer value + 1. In the example shown above,
the enumeration variable has 1, 2, 3, 4, 5, respectively. When there is not ‘= 1’, each constant has
0, 1, 2, 3, 4, 5, respectively.
2.4.4 Character constants
A character constant is a character string that includes one or more characters enclosed in a pair of single quotes
as in ‘X’ or ‘ab’.
A character constant does not include single quote’, backslash (¥ or \), and line feed character (¥n). To represent
these characters, escape sequences are used. There are the following three types of escape sequences.
• Simple escape sequence:
\’ \” \? \¥
\a \b \f \n \r \t \v
• Octal escape sequence:
\octal number [octal number octal number]
(example: \012, \0Note 1)
• Hexadecimal escape sequence : \x hexadecimal number
(example: \xFFNote 2)
Notes 1.
2.
Null character
In this compiler, \xFF represents –1. If the condition (option) that regards char as unsigned char is
added, however, it represents +255.
48
User’s Manual U15556EJ1V0UM