Changeset 21 for trunk/Demos/Structure


Ignore:
Timestamp:
Nov 9, 2010, 2:08:55 PM (14 years ago)
Author:
george
Message:
  • Modified: Project saving.
Location:
trunk/Demos/Structure
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Demos/Structure

    • Property svn:ignore set to
      Compiled
  • trunk/Demos/Structure/Project.pas

    r15 r21  
    11program Project;
    22
    3 uses System, Crt;
     3uses System;
    44
    55type
     6 
     7  TPercent = 0..100;
     8 
    69  TPoint = record
    710    X: Integer;
  • trunk/Demos/Structure/System.pas

    r15 r21  
    33interface
    44
     5const
     6  nil = 0;
     7 
    58type
    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);
    913  Boolean = (False, True);
    1014 
     
    3034 
    3135  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;
    3838
    39 const
    40   MemoryManagerSizeType: TType = Integer;
     39type
    4140 
    42 type
    43   TMemoryManager = record
    44     function Alloc(Size: Integer): Pointer;
    45     function Free(P: Pointer): Integer;
    46     function Realloc(P: Pointer; Size: Integer): Pointer;
    47   end;
    48   PMemoryManager = ^TMemoryManager;
    4941 
    5042  TSystem = record
    51     MemoryManager: TMemoryManager;
    5243  end;
    5344
     
    5546procedure Break; internal;
    5647procedure Continue; internal;
    57 procedure WriteLn; internal;
     48procedure WriteLn(Text: string); internal;
     49function SizeOf(Source: TType): Integer; internal;
     50function IntToStr(Value: Integer): string; internal;
    5851
    59 procedure Move(const Source: type; var Dest: type; Count: Integer);
    60 procedure FillChar(var Dest: type; Count: Integer; Value: Byte);
     52procedure Move(const Source: TType; var Dest: TType; Count: Integer); internal;
     53procedure FillChar(var Dest: TType; Count: Integer; Value: Byte); internal;
    6154 
    6255implementation
    63 
    64 uses
    65   MemoryManager;
    6656
    6757initialization
Note: See TracChangeset for help on using the changeset viewer.