Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

local variables in Perl and Lua

Name: Anonymous 2011-07-22 21:32

I didnt get an answer for this in the Python thread, so I'll ask here: Why do variables have to have the local keyword to make their scope local? Why cant it just use implicit lexical scope like most any other languages?

Name: Anonymous 2011-07-22 22:43

>>6
it looks like you are using a lot of syntax that is very specififac to Lua, so I dont understand what is going on. Im guessing environment is just a regular table unless it happens to be a built in variable name for storing environment variables. It looks like variables that hold a variable declaration. I dont know what the pre-underscore does in _G. Im guessing _ENV is a built in variable for holding variable state.

this is all too much for me to google

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List