lua-users home
lua-l archive

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


 >> I'd like to somehow separate (visually) code in a module into two
 >> sections: export (list of exported functions, variables etc.) and
 >> implementation (internals that should not be used outside this
 >> module).  Is there naming conventions for this in Lua?

> That's normally done by scoping; internal functions are defined as local
> variables rather than as module members.

> local function internalfn(...)
> end

> function externalfn(...)
>   internalfn(...)
> end

Excellent! Thanks.

-- 
Best regards, Aleksey Cheusov.