Shop OBEX P1 Docs P2 Docs Learn Events
Newbie Round Question — Parallax Forums

Newbie Round Question

MichaelOrlando1MichaelOrlando1 Posts: 2
edited 2008-07-21 20:06 in Propeller 1
Hello Everyone

Total Newbie Question

I have search the forum for Round, newbie, ect
Also succesful completed Chapter one thru three toturials

I need help using the spin ROUND(num)
Code:

· ' Light_Count := Light_Count * .0001
·· x := round(Light_Count)···· "Light_count = 1 to 1000·· I want to round to nearestest 100 return 1 to 9



Error Msg >>> Expected a constant, unary operator, or a "(".

Thanks in advance
Mike

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-21 19:58
    Spin provides floating point only with constants and only during compilation. There is a floating point library object that's downloadable from the Propeller Object Exchange that provides all kinds of floating point operations at run time (during execution). Download the object and go through the included manual for examples.
  • MichaelOrlando1MichaelOrlando1 Posts: 2
    edited 2008-07-21 20:06
    Does the round method only except a floating point?·
Sign In or Register to comment.