lua-users home
lua-l archive

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


	Hi there, Luiz Henrique de Figueiredo!
	On Tuesday, 26 of December you wrote:

> >Lua won't let you define a named function from within a function.
> 
> This restriction was removed in Lua 4.0.

Here is sample code chunk:


$ lua test.lua 
error: `(' expected;
  last token read: `.' at line 3 in file `test.lua'
$ cat test.lua
Foo={}
Foo.Bar={}
function Foo.Bar.fun(arg)
        print(arg)
end

Foo.Bar.fun('Hello!')


Comments?

-- 
Best regards, Maxim F. Ischenko.