[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: assignments in expressions?
- From: "Lenny Palozzi" <lenny.palozzi@...>
- Date: Thu, 11 Jan 2001 12:41:41 -0800
In the code below I would like to assign 'c' the return value of function
'f', and have c(or the return value of function 'f') compared to the
right-hand side. From the looks of the Lua syntax, you can't do this in Lua.
error: `)' expected;
last token read: `=' at line 6 in file `t2.lua'
Can Lua be easily changed to handle this? Just curious, as I sometimes write
similar code in C.
while (c=f()) == 1 do