User manual

234
mikoBasic PRO for PIC32
MikroElektronika
Here is an example:
Uncomment the appropriate ag for your application:
‘#DEFINE resolution10
‘#DEFINE resolution12
#IFDEF resolution10 THEN
// <code specic to 10-bit resolution>
#ELSE
#IFDEF resolution12 THEN
// <code specic to 12-bit resolution>
#ELSE
// <default code>
#ENDIF
#ENDIF
Unlike #IFDEF, #IFNDEF checks if ag is not dened by means of #DEFINE, thus producing the opposite results.
Include Directive #I
The #I parameter directive instructs mikroBasic PRO for PIC32 to include the named text le in the compilation. In
effect, the le is inserted in the compiled text right after the #I lename directive. If lename does not specify a
directory path, then, in addition to searching for the le in the same directory as the current unit, mikroBasic PRO for
PIC32 will search for le in order specied by the search paths.
To specify a lename that includes a space, surround the le name with quotation marks: #I “My le”.
There is one restriction to the use of include les: An include le can’t be specied in the middle of a statement part. In
fact, all statements between the begin and end of a statement part must exist in the same source le.
See also Predened Project Level Denes.