Shop OBEX P1 Docs P2 Docs Learn Events
Simple math -- second try — Parallax Forums

Simple math -- second try

ArchiverArchiver Posts: 46,084
edited 2002-04-18 14:12 in General Discussion
Disregard first program look at this one sorry "'" in wrong place..

Leroy

I am working on the following program:

'{$STAMP BS2}
a var byte
b var byte
x var byte
a=23
b=95
x=b/a
'x=x*100
debug "result: ", dec x

After running my debug result is "4" which looks OK.

If I change the program to:

'{$STAMP BS2}
a var byte
b var byte
x var byte
a=23
b=95
x=b/a
x=x*100
debug "result: ", dec x

My debug result is "144" ?

Why is this? I wanted to get "413".



thanks for your help,

Leroy
Sign In or Register to comment.