lua-users home
lua-l archive

Re: I'd give my right arm for a continue statement

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


On 2011年1月28日, 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.

AltStyle によって変換されたページ (->オリジナル) /