[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
**Subject**: **Re: why doesnt a[1] = 1 work?**
**From**: roberto@... (Roberto Ierusalimschy)
**Date**: Wed, 23 May 2007 09:37:04 -0300

> But you could also read this as: assign a the table value {1=1}, if a is not
> of type table. (Ofcourse, if a is a table the index would be
> created/overwritten).
Certainly it could be like this, but then the relationship between
tables and varibales would be murky (like in awk, where tables can
exist only as variables). For instance, what would be the result
of "f(x)[1] = 1" (assuming that f(x) did not return a table)?
-- Roberto