lua-users home
lua-l archive

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

> method="GET"
> if ({ HEAD=true, GET=true, POST=true }) [method] then print "Hey!" end

The extra parentheses are required for a syntactic reason.

Alexandr Leykin kirjoitti 11.11.2007 kello 22:18:

Hello all!

Help me please.
How in the Lua create small "if-in" statement

if method in ('HEAD','GET','POST') then ...

now it's see:

if method =='HEAD' or method=='GET' or method=='POST' then ...