& << >> dont like floats

Everything else that doesn't fall into one of the other PB categories.
Ralf
Enthusiast
Enthusiast
Posts: 203
Joined: Fri May 30, 2003 1:29 pm
Location: Germany

& << >> dont like floats

Post 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)
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post 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) 
El_Choni
Post Reply