fork download
  1. program ideone(input, output);
  2. type
  3. num = 0..5;
  4. stinfo = record
  5. name, stid : char;
  6. math : integer;
  7. eng : integer;
  8. soc : integer;
  9. total : integer;
  10. end;
  11.  
  12. var
  13. st : stinfo;
  14. i : integer;
  15. pp : array[num] of record;
  16.  
  17. function student() : record
  18. begin
  19. read(st.name, st.stid);
  20. read(st.math, st.eng, st.soc);
  21. st.total := st.math + st.eng + st.soc;
  22. return st;
  23. end;
  24.  
  25. begin
  26. i := 0;
  27. while(not EOF) and (i < num) to do
  28. begin
  29. pp[i] := stdent();
  30. i := i=1;
  31. end;
  32.  
  33. end.
  34.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.pas:15: error: syntax error before `;'
prog.pas: In main program:
prog.pas:27: error: variable access expected -- type name given
prog.pas:27: error: syntax error before `to'
stdout
Standard output is empty