[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lua-l
Subject:    Re: Why not semicolon after "function()" ?
From:       Luiz Henrique de Figueiredo <lhf () tecgraf ! puc-rio ! br>
Date:       2000-12-01 11:26:52
Message-ID: 200012011126.JAA29590 () ibere ! tecgraf ! puc-rio ! br
[Download RAW message or body]

>Why is
>    f = function() print(9);end
>accepted, while
>    f = function();print(9);end
>is not?

Because Lua does not have an empty statement.
Semicolons can only appear after statements.
--lhf

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic