View Single Post
KFC911 KFC911 is offline
?
 
Join Date: Apr 2002
Posts: 31,037
Oh god, I'm going back decades (before C, much less ++ ), so I can't offer specifics. In general, if you can't use an expression such as "Do while BooleanFlag = False", or something similar, you can simply set up an outer "If" loop:

Swapped = False
If Swapped = False
....your existing If loop logic...
Swapped = True (when the swap is made...this should terminate the outer loop)

Sorry I don't know C++, and my programming skills are rusty, but maybe this will get you thinking in the right direction...

edited: sorry, I lose my indentations on the looping logic...hope it's still clear as mud

Last edited by KFC911; 09-07-2007 at 10:01 AM..
Old 09-07-2007, 09:58 AM
  Pelican Parts Catalog | Tech Articles | Promos & Specials    Reply With Quote #6 (permalink)