Shop OBEX P1 Docs P2 Docs Learn Events
constants in pasm — Parallax Forums

constants in pasm

mctriviamctrivia Posts: 3,772
edited 2009-03-01 04:32 in Propeller 1
in spin you can define:

constant(((Clock_Pin <# 31) #> 0))

why is there not a system like this for pasm?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Need to make your prop design easier or secure? Get a PropMod $50CAN has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module.

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-03-01 04:32
    It's because it's not necessary. You can just do:

    Label···long·····(Clock_Pin <# 31) #> 0

    and the value is computed at compile time as any Spin constant would be.

    -Phil
Sign In or Register to comment.