Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //In these examples, a and b are conditions that you check for
- ////////////////////////////////////////////////////
- ///////////////////////////////////////////////////
- while (a && b){
- //do stuff
- }
- ////////////////////////////////////////////////
- //IS THE EXACT SAME THING as
- ////////////////////////////////////////////////
- while(true){
- if (!(a && b))
- break;
- else
- //do stuff
- }
- ////////////////////////////////////////////////
- //IS THE EXACT SAME THING as (well, mostly the same thing as; this time a is evaluated, then if it passes, b is evaluated, rather than testing them both at the same time)
- ///////////////////////////////////////////////
- while (a){
- if (!b)
- break;
- else
- //do stuff
- }
- ////////////////////////////////////////////////
- //IS THE EXACT SAME THING as (well, mostly the same thing as, the only thing that changes is that b is checked first this time)
- ///////////////////////////////////////////////
- while (b){
- if (!a)
- break;
- else
- //do stuff
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement