what break; and exit; exactly do? thanks a ton.
Exit: it will exit the procedure or fucntion.
Break: it will break out of a loop. (it will ''ignore'' the first Until. like:
SCAR Code:program Hi;
begin;
repeat;
Writeln('hi');
if Random(5) = 1 then Break; //when random = 1 then it will break out of the loop.
until(false);
writeLn('breaked out of the loop');
end.
ohh... thank you very much.. i have been confused between these for a while now... thanks!
No Problem![]()
You can do verry ussfull stuff with exit and break.
Good Luck with scripting.
They're mainly used for Failsafes...
SCAR Code:if not(LoggedIn) then Exit;
[CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
[CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]
[CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]
I did not even know this XD
The jealous temper of mankind, ever more disposed to censure than
to praise the work of others, has constantly made the pursuit of new
methods and systems no less perilous than the search after unknown
lands and seas.
There are currently 1 users browsing this thread. (0 members and 1 guests)