| Electronic Components Datasheet Search |
|
78K Datasheet(PDF) 115 Page - NEC |
|
|
|||||||||||||||||||||||||||||
78K Datasheet(HTML) 115 Page - NEC |
|
115 / 523 page ![]() CHAPTER 6 CONTROL STRUCTURES OF C LANGUAGE User’s Manual U15556EJ1V0UM 115 (2) switch statement Conditional Statements switch FUNCTION A switch statement has a multiway branching structure and passes control to one of a series of statements that have the case labels in the switch body depending on the value of the control expression enclosed in parentheses. If no case label that corresponds to the control expression exists, the statement that follows the default label is executed. If no default label exists, no statement is executed. SYNTAX switch (expression) statement EXAMPLE extern void func(void); unsigned char mode ; void main(void) { switch (mode) { case 2: mode = 8 ; break ; case 4: mode = 2 ; break ; case 8: func( ); } } NOTE The same value cannot be set in each case label in the switch body. Only one default label can be used in the switch body. |
|
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 |