[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua as Configuration Conditional Statement inside table definition
- From: Wim Couwenberg <wim.couwenberg@...>
- Date: Wed, 10 Nov 2010 14:20:16 +0100
With the risk that this was buried somewhere in this thread already.
You could do it like:
Enum1 = ENUMERATION {
{1, "Forward"},
{2, "Backword"},
BIDIERCTIONAL_SUPPORTED and {3, "BiDirectional"},
{4, "None" }
}
And then do some post processing in the ENUMERATION function to throw
out all false or nil values from the table. (Be careful with the
definition of "array" and nil in Lua..)
Bye,
Wim