lua-users home
lua-l archive

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


Just something that struck me as being odd the other day...

table.insert(table[,pos],data)
--> has the second parameter optional instead of the third ?

switching this to 
table.insert(table,data[,pos])

would, beside a perhaps unprecedented level of incompatibility between versions, give the advantage of being able to use a position parameter calculated from "unusual" conditions (that return a nil result to indicate out of range parameters or such).

Wim