Floating Point Support
kt88seamp
Posts: 112
I heard the prop has limited floating point support. I know passing parameters does not work, but what about something like this:
PUB SquareRoot | result, a
a := 2
result ^^= a
This in real life should return about 1.414. Does the prop store this as a floating point or does it round it to the nearest integer?
·
PUB SquareRoot | result, a
a := 2
result ^^= a
This in real life should return about 1.414. Does the prop store this as a floating point or does it round it to the nearest integer?
·
Comments
If you really need floating point functions you will need to use an object.
However if you just want to ensure you don't loose your 414 then just represent 2 as 2000 and your result will be 1414.
Graham
p.s. I think you have to do result := ^^a