lua-users home
lua-l archive

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


print(#(#x..''))    -- this works (prints 2, the length of 10 as string)
print(##x)          -- this fails "attempt to get length of a number 

..'' is what you're missing in the second line. In the prior you are turning the number to a string with decimal encoding and counting then its length.

print(#(#x)) will not work either out of the same reason