Shop OBEX P1 Docs P2 Docs Learn Events
Please Help — Parallax Forums

Please Help

vladi_05vladi_05 Posts: 2
edited 2010-03-23 18:04 in BASIC Stamp
Hello I have a problem whit a very simple program. The controller doesn't calculate correct. If some one can help me I'll be very grateful.
' {$STAMP BS2}
' {$PBASIC 2.5}
pulseright VAR Word
DO
pulseright = (-55*277)/1000
DEBUG HOME,CLS, SDEC pulseright
PAUSE 150
LOOP

Comments

  • vladi_05vladi_05 Posts: 2
    edited 2010-03-23 15:45
    it should be -15.235 but when i write it as a answer i get 50.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2010-03-23 18:04
    Stamp math·doesn't yield decimal results that way.
    PBASIC Help for division, modulus, signed numbers, and the rest.
Sign In or Register to comment.