[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua syntax gotcha
- From: Philippe Lhoste <PhiLho@...>
- Date: Mon, 26 Oct 2009 11:37:47 +0100
On 25/10/2009 22:40, David Given wrote:
Surprised?
Not really, as I still have in mind the discussions about ambiguities when omitting
semi-colons... :-)
...and if there's more than one statement after the return then the code
won't compile and it's obvious what's going on.
Or if you add these semi-colons:
function test()
print(1);
return;
print(2);
end
=>
'end' expected (to close 'function' at line nn) near 'print'
--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --