Choosing a vehicle model ID
#10

Quote:
Originally Posted by Vince
Посмотреть сообщение
Because it can be replaced with do-while in a lot of cases. The main difference between while and do-while being that do-while always executes at least once because the comparison comes after the loop.

PHP код:
new randModelguard;
do
{
    
randModel minrandom(400611);
}
while(!
isACar(randModel) && ++guard 100); 
Something like that. The "guard" is there so the loop doesn't run potentially infinitely.
Thank you for explaining. :P
Reply


Messages In This Thread
Choosing a vehicle model ID - by JaKe Elite - 18.11.2016, 11:14
Re: Choosing a vehicle model ID - by TonyII - 18.11.2016, 12:33
Re: Choosing a vehicle model ID - by JaKe Elite - 18.11.2016, 12:54
Re: Choosing a vehicle model ID - by GoldenLion - 18.11.2016, 13:28
Re: Choosing a vehicle model ID - by Dayrion - 18.11.2016, 13:52
Re: Choosing a vehicle model ID - by JaKe Elite - 19.11.2016, 03:31
Re: Choosing a vehicle model ID - by JaKe Elite - 19.11.2016, 05:27
Re: Choosing a vehicle model ID - by BroZeus - 19.11.2016, 06:43
Re: Choosing a vehicle model ID - by Vince - 19.11.2016, 08:35
Re: Choosing a vehicle model ID - by GoldenLion - 19.11.2016, 20:00

Forum Jump:


Users browsing this thread: 1 Guest(s)