[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: pcall(pairs, true) with Lua 5.3.5
- From: Roland <roland.yonaba@...>
- Date: Thu, 23 Aug 2018 01:20:06 -0700 (MST)
Hi List,
I was experimenting some things with various versions of Lua. Especially
this :
print(pcall(pairs, true))
Under Lua 5.1.5, it returns : false bad argument #1 to '?' (table expected,
got boolean)
With Lua 5.2.2, it returns : false bad argument #1 to 'pairs' (table
expected, got boolean)
Under Lua 5.3.5, it returns : true function: 6455a2c0 true nil
I do not understand what is going on under Lua 5.3.5. Note that, with a
previous version (Lua 5.3.2 for example), I still have the same result than
Lua5.2 and 5.1 case.
Similarly, still with Lua 5.3.5, the call pcall(pairs,function() end))
returns :
true function: 6455a2c0 function: 008f7fb0 nil
whereas it would have been returning false for previous versions of Lua.
Can anyone help me understand ?
Roland.
--
Sent from: http://lua.2524044.n2.nabble.com/Lua-l-f2524044.html