[fpc-devel]Delphi incompatibity

Pavel V. Ozerski pavel at insect.mail.iephb.ru
Mon Mar 12 14:23:37 CET 2001


Hello,
I try to recompile KOL with Free Pascal.
First big problem: FPC does not support properties in "BP-style" objects, unlike Delphi 3! Kol source code
contains things like this really existing sample:

  TStream = object(TObj)
  {* Simple stream object. Can be opened for file, or as memory stream (see
     NewReadFileStream, NewWriteFileStream, NewMemoryStream). }
  private
    fMethods: TStreamMethods;
    fMemory: Pointer;
    fData: TStreamData;
  protected
    procedure SetPosition(Value: DWord);
    function GetPosition: DWord;
    function GetSize: DWord;
    procedure SetSize(NewSize: DWord);
    destructor Destroy; virtual;
  public
    function Read(var Buffer; Count: DWord): DWord;
    function Seek(MoveTo: Integer; MoveMethod: TMoveMethod): DWord;
    function Write(var Buffer; Count: DWord): DWord;
    property Size: DWord read GetSize write SetSize;
    property Position: DWord read GetPosition write SetPosition;

    property Memory: Pointer read fMemory; // only for memory stream
  end;

Pavel





More information about the fpc-devel mailing list