lua-users home
lua-l archive

Re: array index and modulo

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


sorry, its morning :-)
currentData = currentData % (#data) + 1
On 2007年3月29日 00:34:35 -0700
"Wesley Smith" <wesley.hoke@gmail.com> wrote:
> Ah! that got me too. Here you're incrementing currentData twice,
> producing the series
> 2, 4, 6, 8
> 
> wes

Attachment: pgpwS79L1cZBp.pgp
Description: PGP signature


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