[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Jerome Vuarand's reply to my "table return" query
- From: "Kristofer Karlsson" <kristofer.karlsson@...>
- Date: Fri, 14 Sep 2007 16:02:32 +0200
2007/9/14, Jeff Wise <jwise@sealyrealty.com>:
>
>
>
>
> I apologize for the delay in response to your reply to my question. I was
> away in a class.
>
>
>
> The question was about a function that returned a table. The debugging
> messages in the function indicated that the table was properly built, but
> the main routine had nil for a table. The function was more than a page
> long, and I made a typographical error in the return statement. So the
> problem was my "fat fingers" that type more than one key per keystroke. I
> could not view the return statement and the guts of the code at the same
> time.
>
>
>
> Thanks for your response.
>
>
>
> It would seem to me that an option like VB's "Option Explicit" where all
> variable names must be declared would help with this sort of problem. Is
> this a major code effort, something that would compromise lua's philosophy,
> or …?
>
You could take a look at this:
http://lua-users.org/wiki/LuaLint
It's difficult to implement this in compile time in Lua but you can
easily implement run time checks for access of non-declared global
variables.
I give this as a reference:
http://lua-users.org/lists/lua-l/2007-03/msg00873.html