lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I think because the if statement doesn't need parentheses:

if p < 8 then p = 9  end

if no then then how would you interpret this:

if p < 8 p = 9 end

wes




On Dec 1, 2007 12:01 PM, Matt Campbell <mattcampbell@pobox.com> wrote:
> Perhaps this is a FAQ, but why does the if statement require the "then"
> keyword after the condition?  Does requiring this keyword eliminate some
> ambiguity?
>
> Thanks,
> Matt
>