主题:求助:不能读写些类型变量
program refilel(input,output,rfile);
type
student=record
num:integer;
name: packed array [1..15] of char;
sex:(male,female);
age:5..100;
score:real;
end;
var
rfile:file of student;
stud:student;
se:char;
i:integer;
begin
rewrite(rfile);
writeln('input,se,num,age,score,name');
for i:=1 to 40 do
begin
with stud do
begin
readln(se,num,age,score,name);
if se='m'
then sex:=male
else sex:=female;
end;
write(rfile,stud);
end;
end.
编译错误:readln(se,num,age,score,name);提示cannot read or write variables of this type 不能读写些类型变量 我不知如何处理?
type
student=record
num:integer;
name: packed array [1..15] of char;
sex:(male,female);
age:5..100;
score:real;
end;
var
rfile:file of student;
stud:student;
se:char;
i:integer;
begin
rewrite(rfile);
writeln('input,se,num,age,score,name');
for i:=1 to 40 do
begin
with stud do
begin
readln(se,num,age,score,name);
if se='m'
then sex:=male
else sex:=female;
end;
write(rfile,stud);
end;
end.
编译错误:readln(se,num,age,score,name);提示cannot read or write variables of this type 不能读写些类型变量 我不知如何处理?