ABL electronic PIC12 Personal Computer User Manual


 
Objects
An object is a specific region of memory that can hold a fixed or variable value
(or set of values). To prevent confusion, this use of the word object is different
from the more general term used in object-oriented languages. Our definiton of the
word would encompass functions, variables, symbolic constants, user-defined data
types, and labels.
Each value has an associated name and type (also known as a data type). The
name is used to access the object. This name can be a simple identifier, or it can
be a complex expression that uniquely references the object.
Objects and Declarations
Declarations establish the necessary mapping between identifiers and objects.
Each declaration associates an identifier with a data type.
Associating identifiers with objects requires each identifier to have at least two
attributes: storage class and type (sometimes referred to as data type). The mikroC
compiler deduces these attributes from implicit or explicit declarations in the
source code. Commonly, only the type is explicitly specified and the storage class
specifier assumes automatic value auto.
Generally speaking, an identifier cannot be legally used in a program before its
declaration point in the source code. Legal exceptions to this rule (known as for-
ward references) are labels, calls to undeclared functions, and struct or union tags.
The range of objects that can be declared includes:
variables; functions; types; arrays of other types; structure, union, and enumeration
tags; structure members; union members; enumeration constants; statement labels;
preprocessor macros.
The recursive nature of the declarator syntax allows complex declarators. You’ll
probably want to use typedefs to improve legibility if constructing complex
objects.
mikroC
- C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
52
MikroElektronika:
Development
tools
-
Books
-
Compilers
page
OBJECTS AND LVALUES