lua-l archive
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
] [
Date Index
] [
Thread Index
]
Subject
:
Re: The problem with or and false
From
: Gavin Kistner <gavin@
...
>
Date
: Wed, 29 Mar 2006 23:09:50 -0700
On Mar 29, 2006, at 11:10 AM, Alexander Gladysh wrote:
return A[k] or B[k] or C[k] or error("Not found" .. k)
How about:
return A[k]~=nil and A[k] or B[k]~=nil and B[k] or C[k]~=nil and C[k] or error( "Not Found" .. k )
Follow-Ups
:
Re: The problem with or and false
,
Adrian Sietsma
References
:
The problem with or and false
,
Alexander Gladysh
Prev by Date:
[ANN] stdlib for Lua 5.1; now on LuaForge
Next by Date:
Floating point
Previous by thread:
Re: The problem with or and false
Next by thread:
Re: The problem with or and false
Index(es):
Date
Thread