lua-users home
lua-l archive

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


Luiz Henrique de Figueiredo wrote:
> >* SETTABLE sets an item of a table (_CELLS:spawn , evolve and draw
> >functions), are those functions "appended" to the list? (thus the order
> >of SETTABLE determines what should be used with GETDOTTED and
> >GETINDEXED?)
> 
> I don't understand what you mean here.

I was trying to figure out what the "parameter relations" are of
SETTABLE, GETDOTTED and GETINDEXED (see also answer to next question).
 
> >* In the main SETGLOBAL 0 sets ALIVE to "*". in CELLS(w,h) - function at
> >line 78 - GETGLOBAL 0 returns ARRAY2D? This looks wrong (since ARRAY2D
> >is global 5?)
 
> The index in SETGLOBAL and GETGLOBAL refers to the string array, which is
> local to each function. Globals are not numbered globally :-)

ah.. that explains a lot :) .. thus globals are indexed by their
"stringname" and that "stringname" is stored seperately for every
function (and thus the "index" is different between functions). Does
GETDOTTED work the same way?
---
Jeroen Janssen