lua-users home
lua-l archive

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


>What testing the robustness of the compiler checks, I noticed
>that if I implement a code line such as
>
>x = yyyy(z)
>
>that it won't report to me that the function yyy is undefined.  Does the
>compiler only check general syntax and not the functional dependencies?  Is
>there any way to receive these additional error messages?

The compiler cannot flag "undefined" variables because Lua resolves global names
at run time.

If you want to make sure that your module defines all globals it uses, then
it's simple to look for SETGLOBAL in the listing generated by luac -l and 
try to match those with the ones used in GETGLOBAL, but beware that builtin
functions are global variables...
--lhf