2010-10-14, 01:02 AM
Hazzy Wrote:I saw it used somewhere, it might have been a C++ book. It loops forever. while (true) would have had the same effect.
Edit:
Google'd it.
I put it there so I could test multiple verbs without restarting the program.
Code:
Verb MyVerb = new Verb(infinitive, tense);
for (int i = 0; i < 6; i++) { // <-- WAT
; // <-- WAT
} // <-- WAT
for (int i = 0; i < 6; i++) {
System.out.println(MyVerb.getPronoun(i) + " "
+ MyVerb.conjugate(i));
}
System.out.println(""); //spacer after each verb to make the output more readable
}
}And for infinite loops that depend on user input, a do-while statement is strongly advised.
