lua-users home
lua-l archive

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


On 15.11.2013, u.sch.zw@gmx.de wrote:
...
> assert((i-(""..i)) == 0, "string.len() result not int!")
...
> I am not shure its related to my Pelles-C Compiler. I already disabled 
> all Compiler Optimisation to be save.

There is old bug in Pelles-C with doubles precision.
See [1] and [2].
Try:
  assert((i-(""..i)) < 0.01, "string.len() result not int!")

[1] http://forum.pellesc.de/index.php?topic=848.msg3900;topicseen#msg3900
[2] http://forum.pellesc.de/index.php?topic=4322.msg16031;topicseen#msg16031

-- Nodir