parad0x13 wrote:I meant x*y, because Array[x*y + x] turns the single dimensional array into a psuedo two dimensional one
Not really, because x is a counter, not a constant value. The typical way to do this kind of indexing is (y*width)+x. (y*x)+x will give you very wacky results. Think about it for a bit... if you try to get the entry at coords 0,5 you get (5*0)+0 = 0. Not what you want, I'm sure.
Why would you NOT recommend the yield function?
Just personal preference I guess. There's nothing wrong with it. If you like the idea and it fits well, then go for it.
Just be cautious because it's possible for some potentially unwanted events to be triggered when you yield, resulting in some code being executed that you don't want to be executed.
For example if you yield from 'SomeFunc' (as in my previous example), you wouldn't want an event to enter SomeFunc during the yield or you'll get in a potentially endless event-yield-event-yeild loop which can deadlock the program or crash it in a stack overflow.
I guess it's potential situations like this which shy me away from Yield. But the same thing can happen with threads, too, if you're not careful. So like I say -- go with whatever works.