lua-users home
lua-l archive

Re: Tables as vectors weirdness

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


Lua doesn't have 'vectors' as a datatype. there are a few functions
and optimizations that allow a table to be used for the same purpose.
for these optimizations, there's a definition in the manual: "a
regular array, with non-nil values from 1 to a given n". also: "if
t[1] is nil, n (the array's length) may be zero"
you might not like it (not everybody's happy with this); but if you're
surprised, you're looking from the wrong angle.
-- 
Javier

AltStyle によって変換されたページ (->オリジナル) /