lua-users home
lua-l archive

Re: Multiple values returned or vararg expression in numeric for loop

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


2012年9月16日 Petite Abeille <petite.abeille@gmail.com>:
>
> On Sep 16, 2012, at 7:59 PM, Fidelis Assis <fidelis.assis@gmail.com> wrote:
>
>> With only one var it seems to me the intention
>> is clear.
>
> Well, no, it's not clear: should it be iterated with pairs (map) or ipairs (list)?
There's no order associated with pairs, so I think the reasonable one
would be ipairs (array like tables). Of course, different minds,
different expectations. Anyway, it would be valid for "for _,v in
ipairs()" only.
-- 
Fidelis Assis

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