08m2 a simple math question

Benjie

Senior Member
Hi,
How can I code the comparison between two bytes i.e if bo>b1 then..... or reverse?
Thanks to all
 

lbenson

Senior Member
Not sure what your question is. Try this in the simulator.
Code:
b1 = 2
for b0 = 1 to 3
  if b0 > b1 then
    sertxd(#b0," is greater than ",#b1,cr,lf)
  elseif b0 < b1 then
    sertxd(#b0," is less than ",#b1,cr,lf)
  else
    sertxd(#b0," is equal to ",#b1,cr,lf)
  endif
next b0
 

Benjie

Senior Member
Thank you Ibenson. I was writing more or less the same kind of code but surely I made some sintax error which I read as the absence of the “<“ math function in Picaxe.
Thanks again.
 
Top