use FUNCTIONS!
use FUNCTIONS!
Your missing the point.....its not a messure of ability or even preference........occasionally goto will have its uses.....otherwise it would be taken out of the standard.......Originally posted by biosx
IMHO, if you can't program without goto's, then you can't program. Not to be harsh, but procedural programming should be structured. goto's violate structured programming. I should be able to look at a flowchart of your program and be able to trace a line from beginning to end without having to lift my pencil.
goto's are probably the lamest thing on the planet. continue's are up in the top 10.
In short, goto is fine in assembly and needed. JMPs are essentially gotos. In C/C++, there is always a better way.
In 18 months of programming, I've never found a use for continue. i know 18 months isn't long but I thought I might have used it by now.Originally posted by biosx
goto's are probably the lamest thing on the planet. continue's are up in the top 10.
Btw, I've never used goto either
I think this whole qestion on to GOTO or not to GOTO is dumb
I totally agree with
Fordy- goto has its occ uses
Bubba- the whole thing he said
Again i'll repeat.. that the UNREG guy said to use while in the case ESPARNO asked but as you said that DO executes and then chks i suggest that it will be better to use it than while
Also, i think a lot of people just say that gotos shouldn't be used blah blah blah.. to sound but i have used GOTOs 1000's of times and not encounterd a single problem yet.
-
gotos are needed when you have just typed thousands of lines and you realize you need to repeat somthing