lua-users home
lua-l archive

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


Philippe:

On Sun, May 5, 2019 at 6:40 PM Philippe Verdy <verdy_p@wanadoo.fr> wrote:
> In C, I'd use chained assignements:
>   /*auto or register*/ Object *foo = t.foo = t.foo || whatever; // C

1.- IIRC in C || yields int ( classic, new standars maybe yeed bool ).

2.- If it is an int, I think you can do "int foo = t.foo ||= whatever"
( may need pares ).

FOS