On Mon, Apr 7, 2008 at 2:49 PM, Steven Sacks <[EMAIL PROTECTED]>
wrote:

>
> Doing any kind of math or function call in the comparison function of a
> loop is the polar opposite of efficiency.  ;)



Very true! I Missed the "efficient" part of the question, oops!
Here's the best I've got so far (according to flasm):

var defaultSection:Number = 3;
var maxSection:Number = 6;
var i:Number = maxSection + 1;

while(--i) {
  if (i < defaultSection) {
    trace("lower " + i);
  } else {
    trace("higher " + i);
  }
}

This, of course, supposing he doesn't care about the order of execution.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to