home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / SORT2.ZIP / ERREXIT.INC < prev    next >
Encoding:
Text File  |  1993-01-04  |  340 b   |  12 lines

  1. procedure errexit(msg: string);
  2. { write a message to the console and exit the program with an error code }
  3. { Copyright 1988,1989, by J. W. Rider }
  4.  
  5. var fe:text; begin
  6.  
  7. { The global variable "pname" must be set with the name of the program. }
  8.  
  9. assign(fe,'CON'); rewrite(fe); writeln(fe,pname,': ',msg); close(fe);
  10. halt(1); end;
  11.  
  12.