我无法理解这里发生了什么。你能帮我一下吗?这是有问题的代码:这个Pascal语法有什么问题?
While not EOF(Archi) do begin
index:= index + 1;
Read(Archi, Alumno[index]);
Promes[index] := (Alumno[index].nota1 + Alumno[index].nota2)/2;
if Promes[index] >= 6 then begin
alguPromo := true;
PromosIndex := PromosIndex + 1;
Promos[PromosIndex]:= Alumno[index];
end;
else begin
if Promes[index] > 4 then cantiRecu:= cantiRecu + 1;
else begin
LibresIndex += 1;
Libres[LibresIndex] := Alumno[index];
end;
end;
end;
在这段代码的第10行的编译器标记错误(否则开始)。错误是: 致命:语法错误,;;预计但ELSE发现。
如果有人想托盘编译这里是整个代码:http://pastebin.com/dRg1Lguu
你确定pascal支持+ =运算符吗? – CAMOBAP
代码有什么问题? – BugFinder
在'else'之前的'end'后面应该有**不是**分号。行'cantiRecu:= cantiRecu + 1'同样不应该有分号。 –