objpas.pp 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1998,99 by the Free Pascal development team
  5. This unit makes Free Pascal as much as possible Delphi compatible
  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. {$Mode ObjFpc}
  13. {$I-,S-}
  14. unit objpas;
  15. interface
  16. type
  17. { first, in object pascal, the types must be redefined }
  18. smallint = system.integer;
  19. integer = system.longint;
  20. { the compiler searches in the objpas unit for the tvarrec symbol }
  21. TVarRec = System.TVarRec;
  22. PVarRec = ^TVarRec;
  23. {****************************************************************************
  24. Compatibility routines.
  25. ****************************************************************************}
  26. { Untyped file support }
  27. Procedure AssignFile(Var f:File;const Name:string);
  28. Procedure AssignFile(Var f:File;p:pchar);
  29. Procedure AssignFile(Var f:File;c:char);
  30. Procedure CloseFile(Var f:File);
  31. { Text file support }
  32. Procedure AssignFile(Var t:Text;const s:string);
  33. Procedure AssignFile(Var t:Text;p:pchar);
  34. Procedure AssignFile(Var t:Text;c:char);
  35. Procedure CloseFile(Var t:Text);
  36. { Typed file supoort }
  37. Procedure AssignFile(Var f:TypedFile;const Name:string);
  38. Procedure AssignFile(Var f:TypedFile;p:pchar);
  39. Procedure AssignFile(Var f:TypedFile;c:char);
  40. implementation
  41. {****************************************************************************
  42. Compatibility routines.
  43. ****************************************************************************}
  44. { Untyped file support }
  45. Procedure AssignFile(Var f:File;const Name:string);
  46. begin
  47. System.Assign (F,Name);
  48. end;
  49. Procedure AssignFile(Var f:File;p:pchar);
  50. begin
  51. System.Assign (F,P);
  52. end;
  53. Procedure AssignFile(Var f:File;c:char);
  54. begin
  55. System.Assign (F,C);
  56. end;
  57. Procedure CloseFile(Var f:File);
  58. begin
  59. System.Close(f);
  60. end;
  61. { Text file support }
  62. Procedure AssignFile(Var t:Text;const s:string);
  63. begin
  64. System.Assign (T,S);
  65. end;
  66. Procedure AssignFile(Var t:Text;p:pchar);
  67. begin
  68. System.Assign (T,P);
  69. end;
  70. Procedure AssignFile(Var t:Text;c:char);
  71. begin
  72. System.Assign (T,C);
  73. end;
  74. Procedure CloseFile(Var t:Text);
  75. begin
  76. Close(T);
  77. end;
  78. { Typed file supoort }
  79. Procedure AssignFile(Var f:TypedFile;const Name:string);
  80. begin
  81. system.Assign(F,Name);
  82. end;
  83. Procedure AssignFile(Var f:TypedFile;p:pchar);
  84. begin
  85. system.Assign (F,p);
  86. end;
  87. Procedure AssignFile(Var f:TypedFile;c:char);
  88. begin
  89. system.Assign (F,C);
  90. end;
  91. end.
  92. {
  93. $Log$
  94. Revision 1.24 1999-05-17 21:52:43 florian
  95. * most of the Object Pascal stuff moved to the system unit
  96. Revision 1.23 1999/05/13 21:54:28 peter
  97. * objpas fixes
  98. Revision 1.22 1999/04/16 20:47:20 florian
  99. + tobject.messagestringtable function for Megido/GTK support
  100. added
  101. Revision 1.21 1999/02/23 14:04:36 pierre
  102. * call %edi => call *%edi
  103. Revision 1.20 1999/02/22 23:30:54 florian
  104. + TObject.Dispatch and TObject.DispatchStr added, working
  105. Revision 1.19 1998/12/24 10:12:03 michael
  106. Implemented AssignFile and CloseFile compatibility
  107. Revision 1.18 1998/10/12 12:42:58 florian
  108. * as operator runtime error can be now caught by an errorproc
  109. Revision 1.17 1998/10/05 12:32:53 peter
  110. + assert() support
  111. Revision 1.16 1998/10/03 15:07:16 florian
  112. + TObject.AfterConstruction and TObject.BeforeDestruction of Delphi 4
  113. Revision 1.15 1998/09/24 16:13:48 michael
  114. Changes in exception and open array handling
  115. Revision 1.14 1998/09/23 12:40:43 michael
  116. Fixed TVarRec again. Should be OK now
  117. Revision 1.13 1998/09/23 12:18:32 michael
  118. + added VType in TVArRec
  119. Revision 1.12 1998/09/23 10:00:47 peter
  120. * tvarrec should be 8 bytes
  121. Revision 1.11 1998/09/22 15:30:07 peter
  122. * array of const update
  123. Revision 1.9 1998/09/16 13:08:19 michael
  124. Added AbstractErrorHandler
  125. Revision 1.8 1998/09/06 21:27:31 florian
  126. + method tobject.classinfo added
  127. Revision 1.7 1998/09/04 08:49:06 peter
  128. * 0.99.5 doesn't compile a whole objpas anymore to overcome crashes
  129. Revision 1.6 1998/08/23 20:58:52 florian
  130. + rtti for objects and classes
  131. + TObject.GetClassName implemented
  132. Revision 1.5 1998/07/30 16:10:11 michael
  133. + Added support for ExceptProc+
  134. Revision 1.4 1998/07/29 15:44:33 michael
  135. included sysutils and math.pp as target. They compile now.
  136. Revision 1.3 1998/07/29 10:09:28 michael
  137. + put in exception support
  138. Revision 1.2 1998/03/25 23:40:24 florian
  139. + stuff from old objpash.inc and objpas.inc merged in
  140. }