HTML Code:
program IfThenExample;
procedure RandomFunction;
var
i: Integer;
begin
if (Random(10) < 5) then
WriteLn('Less than 5!')
else
WriteLn('Greater than or equal to 5!')
i := Random(1000);
if ((i < 100) or (i>500)) then
begin
WriteLn('Small or large!');
WriteLn('Which is it?');
end else
begin
WriteLn('Somewhere in the middle!');
WriteLn('But where...');
end;
end;
begin
ClearDebug,
RandomFunction;
end.
Error: [Error] (13:3): Semicolon (';') expected at line 12
Compiling failed.
But there's clearly a semicolon there, am I doing something wrong somewhere else in my code? I can't find the mistake.
Last edited by BelgianFries; 04-02-2013 at 08:00 PM.
Use the "Reply With Quote" option when responding to my posts so that I get a notification, otherwise I won't respond.