Page 1 of 1

& << >> dont like floats

Posted: Mon Mar 22, 2004 11:51 pm
by Ralf

Code: Select all

; compiling failure

  result = (val1 + Cos(val2 / 4) * 32) & (val3-1)

; this methode work fine

  res1 = (val1 + Cos(val2 / 4) * 32)
  result = res1 & (val3-1)

Posted: Tue Mar 23, 2004 12:04 am
by El_Choni
You must convert the float to integer first (you can't use boolean and with floats in PB, and even if you did it using asm, it wouldn't be of much use):

Code: Select all

result = (val1 + Int(Cos(val2 / 4)) * 32) & (val3-1)