lua-users home
lua-l archive

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


I don't understand what is going on here with 5.1
Anyone else get this?

This script

s='7' print(tonumber(s), s)
s='aa' print(tonumber(s), s)
s='na' print(tonumber(s), s)
s='nan' print(tonumber(s), s)
s='n' print(tonumber(s), s)
s='nb' print(tonumber(s), s)
s='v' print(tonumber(s), s)
s='va' print(tonumber(s), s)

Produces

7	7
nil	aa
0	na
nan	nan
0	n
nil	nb
nil	v
nil	va