Heres the thing, its really only a matter of style.
When you compile your program, all your nice readable and elegant do/while, while, for loops, case statements, if/else statements... they're all converted to endless strings of jumps (goto) and conditional jumps (if then).
So, no, goto is not a particular awful and nasty thing to use, however, it is generally considered poor style. You don't want to get mired down in managing a bunch of gotos and goto target addresses... (the labels that specify goto targets). But, if it really makes what you are trying to do MUCH EASIER, and you comment it properly, then sure, use a goto.
__________________ Desktop machine: 2 x Opteron 246, Asus K8N-DL, 2GB PC3200 ECC Reg., XFX GeForce 6600GT, 74gb WD Raptor, 2 x 19\" LCDs, Windows XP x64
Server machine: Intel P4 3.0GHz 2MB EM64T, ECS i865pe, 1GB PC3200, 36gb WD Raptor, Windows Server 2003
Laptop: Dell Inspiron 9100 (Intel P4 3.2GHz 1MB Prescott, i865pe, 512MB PC3200, Mobility Radeon 9700, DVD+R/DL Burner), Windows XP
Linux: P3 450Mhz, 386MB ram, Slackware 10.1 (Running mySQL/Apache) |