Re: Question about arrays...
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Question about arrays...
- From: Dirk Laurie <dirk.laurie@...>
- Date: 2013年6月10日 05:07:11 +0200
2013年6月10日 Coda Highland <chighland@gmail.com>:
> This means that "for
> i = 1,#t" and "for i,_ in ipairs(t)" can have different results.
So supply __ipairs.
With __len available, the safe thing to do is to use it. E.g.
let it return the value of a field `n` in your array, such as
table.unpack so helpfully supplies.
We've come a long way since 4.0, let's say about 400
metres on a standard athletics track. :-)