English
Language : 

CC78K4 Datasheet, PDF (126/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 7 STRUCTURES AND UNIONS
7.1 Structures
As mentioned earlier, a structure is a collection of member objects successively allocated to memory space.
(1) Declaration of structure and structure variable
A structure declaration list and a structure variable are declared with the keyword struct. Any “tag” name can be
given to the structure declaration list.
Subsequently, the structure variables of the same structure may be declared using this tag name.
[Declaration of structure]
struct tag name structure declaration list variable name;
In the following example, in the first struct declaration, int type array “code”, char type arrays name, addr, and
tel which have the tag name “data” are specified and no1 is declared as the structure variable. In the second
struct declaration, the structure variables no2, no3, no4, and no5 that are of the same structure as no1 are
declared.
[Example]
struct data {
int code;
char name [12];
char addr [50];
char tel [12];
} no1;
struct data no2, no3, no4, no5;
126
User’s Manual U15556EJ1V0UM