lua-users home
lua-l archive

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


On Fri, Jul 1, 2011 at 8:42 AM, steve donovan <steve.j.donovan@gmail.com> wrote:
> [1] http://lua-users.org/wiki/ExpressionsAsStatements

I must share one gem from that page, from the ever-prolific Rici Lake:

repeat until nsfm:fileExistsAtPath(testfile) or Shriek "File doesn't exist"

The 'repeat until' is a mouthful, but giving it a new name is a good
job for a preprocessor.

Actually, there is one special kind of expression which is allowed as
a statement, and that is a function call. Allowing _any_ expression to
be a statement would probably result in grammatical ambiguities.

steve d.