lua-users home
lua-l archive

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


Hello Thierry,

Wednesday, September 20, 2006, 12:45:19 AM, you wrote:

GT>             c = 1 when style == "native",
GT>                 2 when style == "rock",
GT>                 0 else

In lua, I think you can write like this:

c = style=="native" and 1
    or style=="rock" and 2 
    or 0


-- 
Best regards,
 cloudwu                            mailto:cloudwu@163.com
            http://www.codingnow.com

[吾生也有涯, 而知也无涯]