[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re[2]: Default value in function parameters?
- From: cloudwu <cloudwu@...>
- Date: Thu, 21 Sep 2006 01:19:04 +0800
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
[吾生也有涯, 而知也无涯]