Error handling 如何修复语法错误“quot;”&引用;预期但;否则";在Pascal中发现错误?

Error handling 如何修复语法错误“quot;”&引用;预期但;否则";在Pascal中发现错误?,error-handling,pascal,Error Handling,Pascal,嵌套时if..else函数有一些问题。下面是代码的预览 If total>10 then writeln('You are a great student who loves to study!'); else; if (total>8) and (total<=10) then writeln ('You are a good student,jus

嵌套时if..else函数有一些问题。下面是代码的预览

        If total>10 then
        writeln('You are a great student who loves to study!');
                else;
                if (total>8) and (total<=10) then
                writeln ('You are a good student,just take more practice.');
                else;
                if (total>6) and (total<=8) then
                writeln ('You are an average student. Try harder in all aspects of your study.');
                else;
                writeln ('You are an under-average student. Try even harder!');
        readkey;
        readln;
End.
如果总数>10,则
writeln(“你是一个热爱学习的好学生!”);
其他的

if(total>8)和(total6)和(total将
else;
的所有实例替换为
else
,并删除每个
else
前面的分号

  if total > 10 then
    WriteLn('You are a great student who loves to study!')
  else if (total > 8) and (total <= 10) then
    WriteLn ('You are a good student; it just takes more practice.')
  else if (total > 6) and (total <= 8) then
    WriteLn ('You are an average student. Try harder in all aspects of your study.')
  else
    WriteLn ('You are a below-average student. Try even harder!');
  ReadKey;
  ReadLn;
如果总数>10,则
WriteLn(“你是一个热爱学习的伟大学生!”)

else if(总计>8)和(总计6)和(总计将
else;
的所有实例替换为
else
,并删除每个
else
前面的分号

  if total > 10 then
    WriteLn('You are a great student who loves to study!')
  else if (total > 8) and (total <= 10) then
    WriteLn ('You are a good student; it just takes more practice.')
  else if (total > 6) and (total <= 8) then
    WriteLn ('You are an average student. Try harder in all aspects of your study.')
  else
    WriteLn ('You are a below-average student. Try even harder!');
  ReadKey;
  ReadLn;
如果总数>10,则
WriteLn(“你是一个热爱学习的伟大学生!”)

else if(total>8)和(total>6)和(total)(感谢您的解决方案。但是在我删除了“else”之后的每个分号之后,我仍然会遇到同样的问题。它位于代码的第一个“else”的某处。必须删除
字符在
else
之前。您是指“writeln”之后的分号吗command?是的,这里有很多这样的错误。请看一个简短的教程:@MartynA:或者LU RD的意思可能是“代码段中的最后一个else子句必须有一个以
”结尾的语句:”谢谢你的解决方案。但是在我删除了“else”之后的每个分号之后,我仍然遇到了同样的问题。它在第一个“else”的某个地方必须删除
字符在
else
之前。你是说“writeln”命令后的分号吗?是的,这里有很多这样的错误。请参阅简短教程:@MartynA:或者LU RD隐含的意思是“最后一个else子句[在代码段中]必须有一个以
”结尾的语句:)