haha, yeah I didn't get it right until I woke up at 6AM after the whiskey wore off. (most of my friends drunk dial/text... I give drunk coding advice)
it ended up that you cant check if position is a negative, you have to do the modulo first. otherwise if the position is a multiple of the len then the modulo would be 0, and no longer a negative.
the above code would return the array's length (len-(0)).
--- edit --- whiskey goes well w/ coffee.




Reply With Quote
