ts010022.pp 876 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. program ts010022;
  2. const
  3. EXCEPTIONCOUNT = 18;
  4. exception_names : array[0..EXCEPTIONCOUNT-1] of pchar = (
  5. 'Division by Zero',
  6. 'Debug',
  7. 'NMI',
  8. 'Breakpoint',
  9. 'Overflow',
  10. 'Bounds Check',
  11. 'Invalid Opcode',
  12. 'Coprocessor not available',
  13. 'Double Fault',
  14. 'Coprocessor overrun',
  15. 'Invalid TSS',
  16. 'Segment Not Present',
  17. 'Stack Fault',
  18. 'General Protection Fault',
  19. 'Page fault',
  20. ' ',
  21. 'Coprocessor Error',
  22. 'Alignment Check');
  23. single_pchar : pchar = 'Alone test';
  24. const filename = 'ts010022.hlp';
  25. var en : pchar;
  26. f : text;
  27. st : string;
  28. begin
  29. assign(f,filename);
  30. rewrite(f);
  31. en:=single_pchar;
  32. Writeln(f,en);
  33. en:=exception_names[6];
  34. writeln(f,en);
  35. close(f);
  36. reset(f);
  37. readln(f,st);
  38. if st<>'Alone test' then halt(1);
  39. readln(f,st);
  40. if st<>'Invalid opcode' then halt(1);
  41. close(f);
  42. end.