lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi all,

If I assign a variable to the result of 23.2/0.2, and print that variable, Lua outputs 116.	

However if I then use the same variable as the limit in an iterator, the iterator stops on the 115th repeat, rather than the 116th as expected.

So it therefore seems that the variable is a floating point number between 115 and 116. 

I don’t understand why I can’t print the floating point value of this variable. I haven’t rounded or truncated it, so why does it print exactly 116, even though that’s not its value?

TIA,
Iain