Documentation (c) 2006-2008 Hobby-Robotics, LLC


Preprocessing

Preprocessing Directives

Include directive

Includes specified file at the point where it is located in the original file.

Syntax:

#Include file_path

Conditional compilation directives

Const directive

Defines new compile constant with the value based on evaluating the expression.

Syntax:

#Const name = expression

If Then ElseIf Else End If directives

Selects source liens to be include in the compilation based on the value of the the compile constants.

Syntax:

#If const_expression Then

...

#ElseIf const_expression

...

[#Else]

...

#End If

Predefined #Const values

#Const

Name

Type

Value

Notes

HBBRVERSION

String

1.106

Version of the compiler

_DATE_

String

Date of compilation

_TIME_

String

Time of compilation

_FILE_

String

Name of the file being compiled

MODVERSION

String

Version of the runtime module – extracted from the MOD file

CPUID

Integer

Numeric representation of the target CPU Id

Specific to the runtime (MOD file)

DEBUG

Boolean

True or False

True when compiling with debug turned on, false otherwise.

LPC2000

Boolean

True or undefined

True when compiling for any of the NXP LPC2000 series microcontroller

LPC210X

Boolean

True or undefined

True when compiling for any of the NXP LPC210X

LPC2104

Boolean

True or undefined

True when compiling for NXP LPC2104

LPC2105

Boolean

True or undefined

True when compiling for NXP LPC2105

LPC2106

Boolean

True or undefined

True when compiling for NXP LPC2106

LPC213X

Boolean

True or undefined

True when compiling for any of the NXP LPC213X

LPC2131

Boolean

True or undefined

True when compiling for NXP LPC2131

LPC2132

Boolean

True or undefined

True when compiling for NXP LPC2132

LPC2134

Boolean

True or undefined

True when compiling for NXP LPC2134

LPC2136

Boolean

True or undefined

True when compiling for NXP LPC2136

LPC2138

Boolean

True or undefined

True when compiling for NXP LPC2138

LPC214X

Boolean

True or undefined

True when compiling for any of the NXP LPC214X

LPC2141

Boolean

True or undefined

True when compiling for NXP LPC2141

LPC2142

Boolean

True or undefined

True when compiling for NXP LPC2142

LPC2144

Boolean

True or undefined

True when compiling for NXP LPC2144

LPC2146

Boolean

True or undefined

True when compiling for NXP LPC2146

LPC2148

Boolean

True or undefined

True when compiling for NXP LPC2148

LPC229X

Boolean

True or undefined

True when compiling for any of the NXP LPC229X

LPC2292

Boolean

True or undefined

True when compiling for NXP LPC2292

LPC2294

Boolean

True or undefined

True when compiling for NXP LPC2294

AT91SAM7

Boolean

True or undefined

True when compiling for any of the Atmel AT91SAM7 series microcontroller

AT91SAM7S

Boolean

True or undefined

True when compiling for any of the Atmel AT91SAM7S

AT91SAM7S64

Boolean

True or undefined

True when compiling for Atmel AT91SAM7S64

AT91SAM7S128

Boolean

True or undefined

True when compiling for Atmel AT91SAM7S128

AT91SAM7S256

Boolean

True or undefined

True when compiling for Atmel AT91SAM7S256

AT91SAM7X128

Boolean

True or undefined

True when compiling for Atmel AT91SAM7X128

AT91SAM7X256

Boolean

True or undefined

True when compiling for Atmel AT91SAM7X256