[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: another bug capricioso
 
- From: spir <denis.spir@...>
 
- Date: Mon, 12 Nov 2012 18:34:04 +0100
 
Maybe related, or not:
   print(string.format("%s", true))
==>
   Error: xyz.lua:192: bad argument #2 to 'format' (string expected, got boolean)
_Sometimes_, in some program files (and the same with other non-string and 
non-number types).
(This is why I was so surprised when, in a previous thread, Luiz H. de 
Figueiredo just stepped it to note it's right what format now does in 5.2 
(auto-convert to string). I then checked in a test file, and it worked like a 
charm. But I knew I had had these errors precisely, reason of my to wrap that 
into a printf and worrying. These same errors now come back in different files 
of 2 different projects. And again I have checked I don't modify by error any 
builtin func or "type-table".)
Thank you,
Denis
PS: it's Lua 5.2.0, not 5.2.1 as indicated by error in previous post, sorry.
PPS: I still dream of a PL where the sign for defining a symbol and the sign for 
redefining one would not so strangely be the same (and so strangely be '='!). So 
that, among other semantic and practicle benefits, it would not be possible to 
modify builtins unintentionnally and without even beeing notified; and maybe we 
would not need names like __newindex or such, just for protection against our 
feable brains ;-)