[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua as Configuration Conditional Statement inside table definition
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 10 Nov 2010 14:04:00 +0200
On Wed, Nov 10, 2010 at 1:52 PM, KHMan <keinhong@gmail.com> wrote:
> If quoting and non-quoting are both valid and have different behaviours,
> then it is a format fail.
Absolutely; I apologize for confusing the issue.
A variant on Luz' proposal is very readable:
{
one = 1,
two = 2,
three = cond(3,THREE_ALLOWED),
four = 4
}
where cond is simply
function cond(val,condn)
if condn then return val end
end
steve d.