lua-users home
lua-l archive

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


On Thu, Dec 11, 2003 at 08:15:22PM -0800, Ando Sonenblick wrote:
> 
> r = {}
> r.top = r.top + 10
> print(r.top)
> 

r = {}
r.top = (r.top or 0) + 10 
print(r.top)

would give you the results that you are looking for, but forces you to
change your second line a bit, which may not be exactly what you wanted.

scott

--