Mikroelektronika MIKROE-738 Datenbogen

Seite von 682
188
mikoC PRO for PIC32
MikroElektronika
Uniqueness and Scope  
Although identifier names are arbitrary (according to the stated rules), if the same name is used for more than one 
identifier within the same scope and sharing the same name space then error arises. Duplicate names are legal for 
different name spaces regardless of scope rules. For more information on scope, refer to Scope and Visibility.
Identifier Examples
Here are some valid identifiers:
temperature_V1
Pressure
no_hit
dat2string
SUM3
_vtext
… and here are some invalid identifiers:
7temp       // NO -- cannot begin with a numeral
%higher     // NO -- cannot contain special characters
int         // NO -- cannot match reserved word
j23.07.04   // NO -- cannot contain special characters (dot)
Punctuators
The mikroC PRO for PIC32 punctuators (also known as separators) are:
 
- [ ] – Brackets 
 
- ( ) – Parentheses 
 
- { } – Braces 
 
- , – Comma 
 
- ; – Semicolon 
 
- : – Colon 
 
- * – Asterisk 
 
- = – Equal sign 
 
- # – Pound sign 
Most of these punctuators also function as operators.
Brackets
Brackets 
[ ]
 indicate single and multidimensional array subscripts:
char ch, str[] = “mikro”;
int mat[3][4];       /* 3 x 4 matrix */
ch = str[3];         /* 4th element */