system.pp 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2006 by Florian Klaempfl
  4. member of the Free Pascal development team.
  5. System unit for embedded systems
  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 system;
  13. {$namespace org.freepascal.rtl}
  14. {*****************************************************************************}
  15. interface
  16. {*****************************************************************************}
  17. {$define FPC_IS_SYSTEM}
  18. {$I-,Q-,H-,R-,V-,P+,T+}
  19. {$implicitexceptions off}
  20. {$mode objfpc}
  21. Type
  22. { Java primitive types }
  23. jboolean = boolean;
  24. jbyte = shortint;
  25. jshort = smallint;
  26. jint = longint;
  27. jlong = int64;
  28. jchar = widechar;
  29. jfloat = single;
  30. jdouble = double;
  31. Arr1jboolean = array of jboolean;
  32. Arr1jbyte = array of jbyte;
  33. Arr1jshort = array of jshort;
  34. Arr1jint = array of jint;
  35. Arr1jlong = array of jlong;
  36. Arr1jchar = array of jchar;
  37. Arr1jfloat = array of jfloat;
  38. Arr1jdouble = array of jdouble;
  39. Arr2jboolean = array of Arr1jboolean;
  40. Arr2jbyte = array of Arr1jbyte;
  41. Arr2jshort = array of Arr1jshort;
  42. Arr2jint = array of Arr1jint;
  43. Arr2jlong = array of Arr1jlong;
  44. Arr2jchar = array of Arr1jchar;
  45. Arr2jfloat = array of Arr1jfloat;
  46. Arr2jdouble = array of Arr1jdouble;
  47. Arr3jboolean = array of Arr2jboolean;
  48. Arr3jbyte = array of Arr2jbyte;
  49. Arr3jshort = array of Arr2jshort;
  50. Arr3jint = array of Arr2jint;
  51. Arr3jlong = array of Arr2jlong;
  52. Arr3jchar = array of Arr2jchar;
  53. Arr3jfloat = array of Arr2jfloat;
  54. Arr3jdouble = array of Arr2jdouble;
  55. const
  56. maxExitCode = 255;
  57. { Java base class type }
  58. {$i java_sysh.inc}
  59. {$i java_sys.inc}
  60. FpcEnumValueObtainable = interface
  61. function fpcOrdinal: jint;
  62. function fpcGenericValueOf(__fpc_int: longint): JLEnum;
  63. end;
  64. {$i jrech.inc}
  65. {$i jseth.inc}
  66. {$i jpvarh.inc}
  67. {$i jsystemh_types.inc}
  68. {$i sstringh.inc}
  69. {$i jdynarrh.inc}
  70. {$i astringh.inc}
  71. {$i jsystemh.inc}
  72. {$i compproc.inc}
  73. {*****************************************************************************}
  74. implementation
  75. {*****************************************************************************}
  76. {$i jdynarr.inc}
  77. {*****************************************************************************
  78. Misc. System Dependent Functions
  79. *****************************************************************************}
  80. procedure System_exit;
  81. begin
  82. JLRuntime.getRuntime.exit(ExitCode);
  83. end;
  84. procedure randomize;
  85. begin
  86. randseed:=JUCalendar.getInstance.getTimeInMillis;
  87. end;
  88. {*****************************************************************************
  89. SystemUnit Initialization
  90. *****************************************************************************}
  91. end.