SW500009 Microchip Technology, SW500009 Datasheet - Page 66

HI-TECH FOR DSPIC/PIC24

SW500009

Manufacturer Part Number
SW500009
Description
HI-TECH FOR DSPIC/PIC24
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC24 & DsPICr
Datasheet

Specifications of SW500009

Supported Families
PIC24
Core Architecture
PIC, DsPIC
Software Edition
Standard
Kit Contents
Software And Docs
Tool Type
Compiler
Mcu Supported Families
PIC24 MCUs And DsPIC DSCs
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
DSPIC3X/PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
025
778-1003
778-1003
Storage Class and Object Placement
the object which the pointer references. If the modifier is to the right of the *( next to the pointer’s
name), it applies to the pointer variable itself. Any data variable qualifier may be applied to pointers
in the above manner.
ci) that is qualified const, however the pointer itself is not qualified. The pointer may be used to
read, but not write, the object to which it references. The contents of the pointer may be read and
written by the program.
case i). Since this object is not qualified, it is a data space object which is referenced by the pointer
and this object can be both read and written using the pointer. However, the pointer is qualified
const and so can only be read by the program — it cannot be made to point to any other object
other than the object whose address initializes the pointer (in this case i).
the address of an object that is also qualified const. Thus the pointer can only be used to read the
object to which it references and the pointer itself cannot be modified so it will always reference the
same object during the program (in this case ci).
3.5 Storage Class and Object Placement
Objects are positioned in different memory areas dependant on their storage class and declaration.
This is discussed in the following sections.
3.5.1 Local Variables
A local variable is one which only has scope within the block in which it was defined. That is, it may
only be referenced within that block. C supports two classes of local variables in functions: auto
variables which are normally allocated in the function’s stack frame, and static variables which
are always given a fixed memory location and have permanent duration.
52
object’s_type_&_qualifiers * pointer’s_qualifiers pointer’s_name = value;
The rule is as follows: if the modifier is to the left of the * in the pointer declaration, it applies to
Here are some examples of pointers, initialized with the address of the variables:
const int ci = 0x55aa;
int i;
const int * cip = &ci ;
int * const icp = &i ;
const int * const cicp = &ci ;
The first example is a pointer called cip. It contains the address of an int object (in this case
The second example is a pointer called icp which contains the address of an int object (in this
The last example is of a pointer called cicp which is itself qualified const and which also holds
C Language Features

Related parts for SW500009