Specifications

http://www.mikroelektronika.co.yu/english/product/books/PICbook/4_Poglavlje.htm
reached.
Example:
#define test
.
ifdef test ;how the test was defined
......; instructions from these lines would execute
endif
Similar directives: #DEFINE, ELSE, ENDIF, IFNDEF, #UNDEFINE
4.15 IFNDEF Execution of a part of the program if symbol
was defined
Syntax:
ifndef<designation>
Description:
If designation <designation> was not previously defined, or if its definition was erased with
directive #UNDEFINE, instructions which follow would be executed until ELSE or ENDIF directives
would be reached.
Example:
#define test
..........
#undefine test
..........
ifndef test ;how the test was undefined
..... .; instructions from these lines would execute
endif
Similar directives: #DEFINE, ELSE, ENDIF, IFDEF, #UNDEFINE
Data Directives
4.16 CBLOCK Defining a block for the named constants
Syntax:
Cblock [<term>]
<label>[:<increment>], <label>[:<increment>]......
endc
Description:
Directive is used to give values to named constants. Each following term receives a value greater
by one than its precursor. If <increment> parameter is also given, then value given in
<increment> parameter is added to the following constant.
Value of <term> parameter is the starting value. If it is not given, it is considered to be zero.
Example:
Cblock 0x02
First, second, third ;first=0x02, second=0x03, third=0x04
endc
cblock 0x02
first : 4, second : 2, third ;first=0x06, second=0x08, third=0x09
endc
Similar directives: ENDC
http://www.mikroelektronika.co.yu/english/product/books/PICbook/4_Poglavlje.htm (10 of 15) [4/2/2003 16:18:10]