Shop OBEX P1 Docs P2 Docs Learn Events
Floating Point Assignment — Parallax Forums

Floating Point Assignment

John AbshierJohn Abshier Posts: 1,116
edited 2006-09-12 18:07 in Propeller 1
Is the following legal?

x := 1.5

or must I declare a constant
CON
·· OnePointFive = 1.5
...
x := OnePointFive

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-09-12 18:07
    Your floating point assignment is legal. As far as SPIN is concerned, outside of the constant definitions and the CONSTANT directive, the floating point value is just another 32 bit quantity. If you do any operations on the value, they're all 32 bit integer operations.
Sign In or Register to comment.