Changeset 21 for trunk/Demos/Structure/System.pas
- Timestamp:
- Nov 9, 2010, 2:08:55 PM (14 years ago)
- Location:
- trunk/Demos/Structure
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Demos/Structure
-
Property svn:ignore
set to
Compiled
-
Property svn:ignore
set to
-
trunk/Demos/Structure/System.pas
r15 r21 3 3 interface 4 4 5 const 6 nil = 0; 7 5 8 type 6 Void = type; 7 Ordinal = type(Void); 8 Float = type(Void); 9 TType = type; 10 Void = type(TType); 11 Ordinal = type(TType); 12 Float = type(TType); 9 13 Boolean = (False, True); 10 14 … … 30 34 31 35 String = array of Char; 32 Pointer = ^Void; 33 TObject = class 34 function ClassName: string; 35 constructor Create; internal; 36 destructor Destroy; internal; 37 end; 36 Pointer = ^TType; 37 TObject = class; 38 38 39 const 40 MemoryManagerSizeType: TType = Integer; 39 type 41 40 42 type43 TMemoryManager = record44 function Alloc(Size: Integer): Pointer;45 function Free(P: Pointer): Integer;46 function Realloc(P: Pointer; Size: Integer): Pointer;47 end;48 PMemoryManager = ^TMemoryManager;49 41 50 42 TSystem = record 51 MemoryManager: TMemoryManager;52 43 end; 53 44 … … 55 46 procedure Break; internal; 56 47 procedure Continue; internal; 57 procedure WriteLn; internal; 48 procedure WriteLn(Text: string); internal; 49 function SizeOf(Source: TType): Integer; internal; 50 function IntToStr(Value: Integer): string; internal; 58 51 59 procedure Move(const Source: type; var Dest: type; Count: Integer);60 procedure FillChar(var Dest: type; Count: Integer; Value: Byte);52 procedure Move(const Source: TType; var Dest: TType; Count: Integer); internal; 53 procedure FillChar(var Dest: TType; Count: Integer; Value: Byte); internal; 61 54 62 55 implementation 63 64 uses65 MemoryManager;66 56 67 57 initialization
Note:
See TracChangeset
for help on using the changeset viewer.