Mikroelektronika MIKROE-738 Datenbogen
![Mikroelektronika](https://files.manualsbrain.com/attachments/e0529b3b58069a916ad7bb89f7e9f5f0eda73421/common/fit/150/50/1b07b99aa3112e022a916b06db07f1f4f211e91d41878452d87c7638b1bf/brand_logo.gif)
140
mikoC PRO for PIC32
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 define 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 defined
...
void main() {
...
}
Note: Bear in mind that when using
at
operator in your code over a variable defined through the
extern
modifier,
appropriate memory specifer must be appended also.
bit type
The mikroC PRO for PIC32 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 fields, Predefined globals and constants, Extern modifier