[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: orif
- From: Jonathan Goble <jcgoble3@...>
- Date: Fri, 14 Aug 2015 15:20:40 -0400
On Fri, Aug 14, 2015 at 3:17 PM, Soni L. <fakedme@gmail.com> wrote:
> On 14/08/15 04:08 PM, Jonathan Goble wrote:
>> This can be written in stock Lua without any new features by using
>> nested if blocks:
>>
>> local flag = false
>> if i == 1 or i == 2 then
>> if i == 1 then
>> flag = true
>> end
>> print(flag)
>> else
>> print"Unknown!"
>> end
>>
> But now you check for the condition twice.
I never said it was a good way to write it. I just said it was possible.