lua-users home
lua-l archive

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


On Monday, December 22, 2014 01:58:13 PM Antonio Scuri wrote:
>   I would like to write something like this *in a single line*:
> 
> y = (x == nil)? x: x + 1

Technically "if x==nil then y=x else y=x+1 end" is a single line. But I think 
you meant single expression.

-- 
tom <telliamed@whoopdedo.org>