View Single Post
 
Reply
Posted 2007-07-24, 03:01 PM in reply to Mantralord's post starting "Goto's are fine for some things. ..."
Or, you could simply put the loops in an inline function and return from it.

All this structure, of course, breaks down to gotos at the machine code level, anyway.

Of course, you can write spaghetti code without gotos, too:
Code:
unsigned uState=0;
while(1){
  switch(uState){
    case 0:
      //stuff
      uState=2;
      break;
    case 1:
      //other stuff
      break;
    case 2:
      //land here
      uState=1;
      break;
  }
}
This is actually a construct commonly used in my line of work 0_0
Old
Profile PM WWW Search
WetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusion
 
 
WetWired