Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The following constants are pre-defined by the compiler:

Child pages (Children Display)
excerpttrue

Constant Table

TRUELogical true:-1($FFFFFFFF)
FALSELogical false:0($00000000)
POSXMaximum positive integer:2147483647($7FFFFFFF)
NEGXMaximum negative integer:-2147483648($80000000)
PIFloating-point value for PI:≈ 3.141593($40490FDB)
RCFASTInternal fast oscillator:$00000001(%00000000001)
RCSLOWInternal slow oscillator:$00000002(%00000000010)
XINPUTExternal clock/oscillator:$00000004(%00000000100)
XTAL1External low-speed crystal:$00000008(%00000001000)
XTAL2External medium-speed crystal:$00000010(%00000010000)
XTAL3External high-speed crystal:$00000020(%00000100000)
PLL1XExternal frequency times 1:$00000040(%00001000000)
PLL2XExternal frequency times 2:$00000080(%00010000000)
PLL4XExternal frequency times 4:$00000100(%00100000000)
PLL8XExternal frequency times 8:$00000200(%01000000000)
PLL16XExternal 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:

Code Block
  if (X = TRUE) or (Y = FALSE)
    <code to execute if total condition is true> 

POSX and NEGX

POSX and NEGX are typically used for comparison purposes or as a flag for a specific event:

Code Block
  if Z > NEGX
    <code to execute if Z hasn't reached smallest negative>

—or—

...

)

...

PI

PI can be used for floating-point calculations, either floating-point constants or floating-point variable values using the FloatMath and FloatString object.

RCFAST through PLL16X

RCFAST through PLL16X are Clock Mode Setting constants. They are explained in further detail in the _CLKMODE section.

...