lua-users home
lua-l archive

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


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
--  --  --  --  --  --  --  --  --  --  --  --  --  --