Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Exiting a Loop Remotely

Name: Anonymous 2011-07-04 15:02

boolean stop = false;
for (int i=0; i <4; i++){
if(stop== true){
break;
}else if(i==1){
//do shit
}else if (i==2){
//do shit different
}else if(i==3){
//do third shit
}
onActionDown(){
stop = true;
}

This isn't stopping the loop. Why /prog/, why?

Name: Anonymous 2011-07-04 15:04

Because the Halting Problem is not solvable.

Name: Anonymous 2011-07-04 15:05

Learn idioms.

Name: Anonymous 2011-07-04 15:37

== true

Name: Anonymous 2011-07-04 15:52

Good gentleman, may I recommend something else entirely?

{
  /* Do shit */
}

{
  /* Do shit differently */
}

{
  /* Do shit even more differently */
}

Don't change these.
Name: Email:
Entire Thread Thread List