lua-users home
lua-l archive

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



On Wed, Feb 2, 2011 at 1:36 PM, Patrick Mc(avery <spell_gooder_now@spellingbeewinnars.org> wrote:
This code:

for i = 10, 1 do
local  value .. i = {}
end


does not work, I am assuming it's because variables do not have types only values do?

Is there someway to automatically generate variable names?


It's not entirely clear what you want to do. You can create new global variables via _G. But why would you want to create local ones that way, why not simply use a table? I'd be interested to hear the use case.

Also, I think you meant to write "for i = 10, 1, -1 do".

Robby