User manual

144
mikoC PRO for dsPIC
MikroElektronika
at keyword
You can use the keyword "at" to make an alias to a variable, for example, you can write a library without using register
names, and later in the main program to dene those registers, for example :
extern char PORTAlias; // here in the library we can use its symbolic name
char PORTAlias at PORTB; // this is where PORTAlias is fully dened
...
void main() {
...
}
Note : Bear in mind that when using at operator in your code over a variable dened through a extern modier,
appropriate memory specifer must be appended also.
bit type
The mikroC PRO for dsPIC30/33 and PIC24 compiler provides a bit data type that may be used for variable
declarations. It can not be used for argument lists, and function-return values.
bit bf; // bit variable
There are no pointers to bit variables:
bit *ptr; // invalid
An array of type bit is not valid:
bit arr [5]; // invalid
Note :
- Bit variables can not be initialized.
- Bit variables can not be members of structures and unions.
- Bit variables do not have addresses, therefore unary operator & (address of) is not applicable to these variables.
Related topics: Bit elds, Predened globals and constants, Extern modier