I'm trying out how to work out using cases with for..to..do setups, but I'm not sure what the syntax is for using cases with if...then statements. I'll post the script:
SCAR Code:program New;
var
x : Integer;
begin
for x:=1 to 10 do
begin
Wait(1000);
case Random(2) of
0: Writeln('Hello!');
1: Writeln('Hi!');
end;
if(Writeln('Hello!'))then
break;
end;
end.
I want it to Break; if it Writelns "Hello!". This doesn't work, it gives me a mismatch error.
I tried assigning the two Writelns to variables, but that didn't work either.
Please help,![]()
Mike.








Reply With Quote



