Hi there, I hope someone can help! I'm new to Pascal programming and I'm
trying to read records from a text file, but exit code=106
type
condition=record
no:string[30];
time_left:integer;
end;
var traffic:array[1..20] of condition;
procedure input_traffic(var count2:integer);
var count:integer;
begin
count2:=0;
assign(trafficfile,'C:/trafficcontrol/traffic.txt');
reset(trafficfile);
while not eof(trafficfile) do
begin
count2:=count2+1;
with traffic[count2] do
begin
readln(trafficfile,no);
readln(trafficfile,landing_time_left);
end;
end;
close(trafficfile);
end;
begin
count2:=0;
input_traffic(count2)
end.