| Electronic Components Datasheet Search |
|
78IV Datasheet(PDF) 62 Page - NEC |
|
|
|||||||||||||||||||||||||||||
78IV Datasheet(HTML) 62 Page - NEC |
|
62 / 523 page ![]() CHAPTER 3 DECLARATION OF TYPES AND STORAGE CLASSES User’s Manual U15556EJ1V0UM 62 3.7 Initialization Initialization refers to setting a value in an object beforehand. An initializer carries out the initialization of an object. Initialization is performed as follows. object = {initializer list} An initializer list must contain initializers for the number of objects to be initialized. All expressions in initializers or an initializer list for objects that have static storage duration and objects that have an aggregate type or a union type must be specified with constant expressions. Identifiers that declare block scope but have external or internal linkage cannot be initialized. (1) Initialization of objects which have a static storage duration If no attempt is made to initialize an arithmetic type object that has static storage duration, the value of the object will be implicitly initialized to 0. Likewise, a pointer type object that has a static storage duration will be initialized to a null pointer constant. Example unsigned int gval1; /* initialized by 0 */ static int gval2; /* initialized by 0 */ void func (void) { static char aval; /* initialized by 0 */ } (2) Initialization of objects that have an automatic storage duration The value of an object that has automatic storage duration becomes undefined and will not be guaranteed if it is not initialized. Example void func(void){ char aval; /*undefined at this point */ : aval = 1; /* initialized to 1 */ } (3) Initialization of character arrays A character array can be initialized by a char string literal (char string enclosed with “ ”). Likewise, a character string in which a series of char string literals are contained initializes the individual members or elements of an array. In the following example, the array objects “s” and “t” with no type qualifier are defined and the elements of each array will be initialized by a char string literal. char s[ ] = “abc”, t[3] = “abc” ; |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |