home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_01_03 / 1n03008a < prev    next >
Text File  |  1990-06-14  |  336b  |  27 lines

  1.  
  2. Listing 1
  3.  
  4. {*
  5.  * Terminate the program with an error message if
  6.  * pointer p is NIL.
  7.  *}
  8. procedure not_NIL(p : pointer);
  9.         begin
  10.         if p = NIL then
  11.                 runerror(204);
  12.         end;
  13.  
  14. var
  15.         p : ^char;
  16. begin
  17. p := NIL;
  18. {$ifdef DEBUG}
  19.         not_NIL(p);
  20. {$endif}
  21. .
  22. .
  23. p^ := 'a';
  24. end.
  25.  
  26.  
  27.