do-while vs. goto?
#7

I recall reading that we actually have loops to avoid having to use goto. Although, there should be nothing explicitly wrong with it in many coding languages, it is considered bad practice. When you use goto, it is an indication that your code could probably be built up in a better fashion (so it is less confusing).

It is up to you to run the speed tests, also see what the assembly output looks like (compile with -a) and see the differences.

Short version - structured programming is here to avoid goto.
Reply


Messages In This Thread
do-while vs. goto? - by [XST]O_x - 12.04.2013, 19:24
Re: do-while vs. goto? - by Bakr - 12.04.2013, 19:44
Re: do-while vs. goto? - by [XST]O_x - 12.04.2013, 19:49
Re: do-while vs. goto? - by Bakr - 12.04.2013, 20:03
Re: do-while vs. goto? - by [XST]O_x - 12.04.2013, 20:15
Re: do-while vs. goto? - by Bakr - 12.04.2013, 20:26
Re: do-while vs. goto? - by AndreT - 12.04.2013, 20:35
Re: do-while vs. goto? - by [XST]O_x - 12.04.2013, 20:48
Re: do-while vs. goto? - by AndreT - 12.04.2013, 21:05
Re: do-while vs. goto? - by [XST]O_x - 12.04.2013, 21:12

Forum Jump:


Users browsing this thread: 4 Guest(s)