PDA

View Full Version : Please Help



vladi_05
03-23-2010, 11:30 PM
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

vladi_05
03-23-2010, 11:45 PM
it should be -15.235 but when i write it as a answer i get 50.

PJ Allen
03-24-2010, 02:04 AM
Stamp mathˇdoesn't yield decimal results that way.
PBASIC Help for division, modulus, signed numbers, and the rest.