lua-users home
lua-l archive

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


On Fri, 28 Jan 2011, David Kastrup wrote:

> do 'not?':format() end
>
> Surprisingly, it works only with parens around the string in Lua 5.1,
> but shouldn't it work in 5.2?

No. Statements in Lua can only start with a keyword, a variable name, or
an open round bracket. The left hand side of a prefix expression (function
calls, table indexes) can not be a number or string or table constructor,
amongst other things.

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
HUMBER THAMES DOVER WIGHT PORTLAND: NORTH BACKING WEST OR NORTHWEST, 5 TO 7,
DECREASING 4 OR 5, OCCASIONALLY 6 LATER IN HUMBER AND THAMES. MODERATE OR
ROUGH. RAIN THEN FAIR. GOOD.