lua-users home
lua-l archive

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


>> >Lua won't let you define a named function from within a function.
>> 
>> This restriction was removed in Lua 4.0.
>
>function Foo.Bar.fun(arg)
>error: `(' expected;
>  last token read: `.' at line 3 in file `test.lua'

I meant that in Lua 4.0 you can write

function a()
  function b()
   ...
  end
end

The restrictions on what expressions may appear after "function" are still
in place.
--lhf