sysutils.pp 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. {$ifndef VER0_99_5}
  15. {$define USE_EXCEPTIONS}
  16. {$endif}
  17. uses
  18. dos,objpas; { should become platform independent }
  19. type
  20. { some helpful data types }
  21. tprocedure = procedure;
  22. tfilename = string;
  23. longrec = packed record
  24. lo,hi : word;
  25. end;
  26. wordrec = packed record
  27. lo,hi : byte;
  28. end;
  29. {$ifdef USE_EXCEPIONS}
  30. { exceptions }
  31. exception = class(tobject)
  32. private
  33. fmessage : string;
  34. fhelpcontext : longint;
  35. public
  36. constructor create(const msg : string);
  37. //!! No array of const yet.
  38. // constructor createfmt(const msg; const args : array of const);
  39. constructor createres(indent : longint);
  40. { !!!! }
  41. property helpcontext : longint read fhelpcontext write fhelpcontext;
  42. property message : string read fmessage write fmessage;
  43. end;
  44. exceptclass = class of exception;
  45. { math. exceptions }
  46. einterror = class(exception);
  47. edivbyzero = class(einterror);
  48. erangeerror = class(einterror);
  49. eintoverflow = class(einterror);
  50. ematherror = class(exception);
  51. {$endif USE_EXCEPIONS}
  52. { Read date & Time function declarations }
  53. {$i datih.inc}
  54. { Read String Handling functions declaration }
  55. {$i sysstrh.inc}
  56. { Read pchar handling functions declration }
  57. {$i syspchh.inc}
  58. { Read filename handling functions declaration }
  59. {$i finah.inc}
  60. implementation
  61. { Read filename handling functions implementation }
  62. {$i fina.inc}
  63. { Read date & Time function implementations }
  64. {$i dati.inc}
  65. { Read String Handling functions implementation }
  66. {$i sysstr.inc}
  67. { Read pchar handling functions implementation }
  68. {$i syspch.inc}
  69. {$ifdef USE_EXCEPIONS}
  70. constructor exception.create(const msg : string);
  71. begin
  72. inherited create;
  73. message:=msg;
  74. {!!!!!}
  75. end;
  76. {
  77. constructor exception.createfmt(const msg; const args : array of const);
  78. begin
  79. inherited create;
  80. end;
  81. }
  82. constructor exception.createres(indent : longint);
  83. begin
  84. inherited create;
  85. {!!!!!}
  86. end;
  87. {$endif USE_EXCEPIONS}
  88. end.
  89. {
  90. $Log$
  91. Revision 1.5 1998-09-04 08:49:07 peter
  92. * 0.99.5 doesn't compile a whole objpas anymore to overcome crashes
  93. Revision 1.4 1998/08/10 15:52:27 peter
  94. * fixed so 0.99.5 compiles it, but no exception class
  95. Revision 1.3 1998/07/29 15:44:32 michael
  96. included sysutils and math.pp as target. They compile now.
  97. Revision 1.2 1998/04/10 15:18:21 michael
  98. Added a lot of functions donated by GertJan Schouten
  99. Revision 1.1.1.1 1998/03/25 11:18:49 root
  100. * Restored version
  101. Revision 1.1 1998/02/05 11:11:32 michael
  102. + moved to objpas directory
  103. Revision 1.2 1998/02/03 15:27:25 florian
  104. *** empty log message ***
  105. Revision 1.1 1998/02/01 23:32:01 florian
  106. + initial revision
  107. }