Page 1 of 1

Cant use any operand on floats

Posted: Tue Aug 01, 2017 8:21 am
by MrTAToad
With this :

Code: Select all

Define a.b=2
Define b.b=4
Define c.f=6

#P1 = 5
#P2 = 128

If ((a & #P1) And (c>4.0)) Or ((b & #P2) And (c>5.0))
  Debug "H"
EndIf
I get the "Cant use any of the following operands on floats" error message for some reason

Re: Cant use any operand on floats

Posted: Tue Aug 01, 2017 9:32 am
by Fred
Yes, the whole expression is promoted to float as soon a float is used. That's a compiler limitation unfortunately.

Re: Cant use any operand on floats

Posted: Tue Aug 01, 2017 1:15 pm
by MrTAToad
Ah right - in that case, the comparisons will have to be modified a bit.