Propeller Manual

Table Of Contents
2: Spin Language Reference – Constants (pre-defined)
Constants (pre-defined)
The following constants are pre-defined by the compiler:
TRUE Logical true: -1 ($FFFFFFFF)
FALSE Logical false: 0 ($00000000)
POSX Maximum positive integer: 2,147,483,647 ($7FFFFFFF)
NEGX Maximum negative integer: -2,147,483,648 ($80000000)
PI Floating-point value for PI: 3.141593 ($40490FDB)
RCFAST Internal fast oscillator: $00000001 (%00000000001)
RCSLOW Internal slow oscillator: $00000002 (%00000000010)
XINPUT External clock/oscillator: $00000004 (%00000000100)
XTAL1 External low-speed crystal: $00000008 (%00000001000)
XTAL2 External medium-speed crystal: $00000010 (%00000010000)
XTAL3 External high-speed crystal: $00000020 (%00000100000)
PLL1X External frequency times 1: $00000040 (%00001000000)
PLL2X External frequency times 2: $00000080 (%00010000000)
PLL4X External frequency times 4: $00000100 (%00100000000)
PLL8X External frequency times 8: $00000200 (%01000000000)
PLL16X External frequency times 16: $00000400 (%10000000000)
(All of these constants are also available in Propeller Assembly.)
TRUE and FALSE
TRUE and FALSE are usually used for Boolean comparison purposes:
if (X = TRUE) or (Y = FALSE)
<code to execute if total condition is true>
Propeller Manual v1.1 · Page 93