Just some other useful commands.
Break: if in a loop then it exits it, Example:
Code:
var i: integer;
begin
repeat
wait(200);
i:= i + 1;
if (i = 5) then
break;
writeln(inttostr(i));
until(false);
writeln('i is now 5.');
end.
Exit: Exits a procedure or function and continues on the main loop:
Code:
procedure Hi;
var i: Integer;
begin
repeat
wait(20);
i:= i + 1;
if (i = 20) then
exit;
writeln(inttostr(i));
until(false);
Writeln('The script never reaches here due to the exit.');
end;
begin
Hi;
Writeln('Continueing..');
end.
Terminatescript: Immediatly stops the script wherever:
Code:
begin
Terminatescript;
Writeln('...');
end.
or:
Code:
procedure Wee;
begin
Terminatescript;
end;
begin
Wee;
Writeln('..');
end.
<3