lua-users home
lua-l archive

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


Nick Gammon wrote:
[snip snip]
Even "The Complete Syntax Of Lua" doesn't seem to mention whitespace. Obviously it is needed to separate words like "local" and "function" but that seems to be implied.

The lexical analyzer separates the input into tokens, so the parser sees tokens only. Whitespace, comments, etc. are removed during lexical analysis. So I guess it's implied, the ref manual kinda expects that you are aware of the two processing phases.

So please don't laugh, but can someone point me to where it says, on the official documentation, that a space is OK between a function name and the bracket which starts the arguments? Thank you.

I think either one is fine, as long as it is consistent. But then I'm not much of a stickler for particular styles, so YMMV...

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia