while(condition) { switch(some_var) { case 'y': do_something(); break;
case 'x': goto end; break; } }
end:
Is this something not very advisable to do? Well at least that is what an author suggested.. in my short experience I can firmly say that it doesnt look so clean on my code..
It's horrible. You mean this: looping = 1; while( looping && condition) { switch(some_var) { case 'y': do_something(); break; case 'x': looping = 0; break; } } 'looping' should obviously be replaced with a variable name describing the reason you need to continue round the loop. -- "...our desktop is falling behind stability-wise and feature wise to KDE ...when I went to Mexico in December to the facility where we launched gnome, they had all switched to KDE3." - Miguel de Icaza, March 2003