lua-users home
lua-l archive

Syntax question

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


Hi.
I have a (stupid) question to which I could not find answer in Lua mailing list or in Lua 5 reference manual. Why first parenthesis after function must be in the same line with function name?
Examples:
print(1) -- Ok
print( -- Ok
2
)
print ( -- Ok
3
)
print -- Not Ok
(
4
)
Seems to me that only function parenthesis must be in the same line with function name. Following examples are ok:
a
=
55
print(a)
for
i
=
1
,
5
do
print(
i
)
end
a
=
{
5
}
print(a[1])
Florian

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