Search found 1 match

Return to advanced search

Re: C: alternative to goto?

goto can be useful, if you need to break out of a nested loop. Let's say you had a game like this where ESC would isntantly break you out of the game loop: while(Running) { while(!GameOver()) { char kbinput; while(GetInput(&kbinput)) { if(kbinput==KEY_ESCAPE) goto escape; } } } escape: retur...
by YACH
on Wed Jul 23, 2008 4:25 pm
 
Forum: Programming
Topic: C: alternative to goto?
Comments: 10
Views: 8710

Return to advanced search