sysutils.pp 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1998 by Florian Klaempfl
  5. member of the Free Pascal development team
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. unit sysutils;
  13. interface
  14. type
  15. { some helpful data types }
  16. tprocedure = procedure;
  17. tfilename = string;
  18. longrec = packed record
  19. lo,hi : word;
  20. end;
  21. wordrec = packed record
  22. lo,hi : byte;
  23. end;
  24. { exceptions }
  25. exceptclass = class of exception;
  26. exception = class(tobject)
  27. private
  28. fmessage : string;
  29. fhelpcontext : longint;
  30. public
  31. constructor create(const msg : string);
  32. constructor createfmt(const msg; const args : array of const);
  33. constructor createres(indent : longint);
  34. { !!!! }
  35. property helcontext : longint read fhelpcontext write fhelpcontext;
  36. property message : string read fmessage write fmessage;
  37. end;
  38. { math. exceptions }
  39. einterror = class(exception);
  40. edivbyzero = class(einterror);
  41. erangeerror = class(einterror);
  42. eintoverflow = class(einterror);
  43. ematherror = class(exception);
  44. implementation
  45. constructor texception.create(const msg : string);
  46. begin
  47. inherited create;
  48. message:=msg;
  49. {!!!!!}
  50. end;
  51. constructor texception.createfmt(const msg; const args : array of const);
  52. begin
  53. inherited create;
  54. {!!!!!}
  55. end;
  56. constructor texception.createres(indent : longint);
  57. begin
  58. inherited create;
  59. {!!!!!}
  60. end;
  61. end.
  62. {
  63. $Log$
  64. Revision 1.1 1998-03-25 11:18:49 root
  65. Initial revision
  66. Revision 1.1 1998/02/05 11:11:32 michael
  67. + moved to objpas directory
  68. Revision 1.2 1998/02/03 15:27:25 florian
  69. *** empty log message ***
  70. Revision 1.1 1998/02/01 23:32:01 florian
  71. + initial revision
  72. }