if statement / condition
#2

Quote:

while is a loop type similar to for and do..while. The basic operation is an if statement done which if true does some code and jumps back to the if. If it's false it goes to after the loop code - there is no else. Going back to the goto example:

Код:
new
	i = 0;
for_loop:
if (i < 10)
{
	i++;
	goto for_loop;
}
This can also be written as:

Код:
new
	i = 0;
while (i < 10)
{
	i++;
}
Have look at -> https://sampwiki.blast.hk/wiki/While#while
Reply


Messages In This Thread
if statement / condition - by thefatshizms - 24.12.2012, 18:27
Re: if statement / condition - by Typhome - 24.12.2012, 18:29
Re: if statement / condition - by Konstantinos - 24.12.2012, 18:31
Re: if statement / condition - by thefatshizms - 24.12.2012, 18:33

Forum Jump:


Users browsing this thread: 1 Guest(s)