Repeat is the exact same thing as while, just more convenient. But how would you end a while line?
Like,
SCAR Code:For I := 0 to 10 Do
This;
That;
And_This;
///STOP here and goes on with the script like an Until
More_Stuff;
Repeat is the exact same thing as while, just more convenient. But how would you end a while line?
Like,
SCAR Code:For I := 0 to 10 Do
This;
That;
And_This;
///STOP here and goes on with the script like an Until
More_Stuff;
SCAR Code:For I := 0 to 10 Do
begin
This;
That;
And_This;
end;///STOP here and goes on with the script like an Until
More_Stuff;
NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN
Ahh, just like a case. Thanks bionicle.![]()
btw this is a for-to-do loop, not a while-do![]()
NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN
SCAR Code:while i := 0 to high(whatever) do
begin
yourmom;
imaleethax0r;
end;
You can also use a break with an if then i.e.
SCAR Code:while i := 0 to high(hahahahaomg) do
begin
ohai;
if(imleet)then
break;
end;
Which the break will break from the loop where ever its at
E: Wow epicly failed ninja
actually, a while loop is
SCAR Code:while this do
begin
that
orly
thatagain
end;
<TViYH> i had a dream about you again awkwardsaw
Malachi 2:3
The difference between a while loop and a repeat..until loop is that the while loop checks its condition at the beginning of a loop, while repeat checks it at the end.
There are currently 1 users browsing this thread. (0 members and 1 guests)