do-while vs. goto?
#3

Quote:
Originally Posted by Bakr
Посмотреть сообщение
They really aren't the same thing. Do-while loops are just like while loops except they will always be executed at least once. Goto is also a very bad practice; you can search all over the Internet to find evidence to support that claim:


Your example above can also be achieved by a standard while loop:
pawn Код:
while(aCurrentlyPlaying[playerid] == aPlayerList[randomSongPick][0][0]) randomSongPick = random(sizeof(aPlayList));
Yeah, thanks for fixing my mistake with the loop, but my point with opening this thread was basically seeing the difference between the two and this code was just an example.
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: 1 Guest(s)