Newbie Q: Porting TObject to gpc?

Alexander von Below below at mac.com
Fri Aug 10 11:10:53 CEST 2007


You are absolutely correct, sorry for not adding a code snippet:

Here we go, I hope this gives you an idea

unit Someunit;

interface
uses
  Classes, Sysutils,
  U_Global, L_Lockdata, U_Strings, U_RegExpr, L_Wintol, U_Images,  
U_Stream,
  U_Tiff, U_Tiff_Tags, U_Tiff_Global, U_Pixels, L_Mathe, LeanOcr,  
U_Wininfo;

  TMyFile = class(TObject)
   private
    FFilename: String;
{ etc }
    procedure SetFilename(const Value: String);
   public
    destructor destroy; override;
    property Filename: String read FFilename write SetFilename;
{ etc }
end;

Alex

Am 10.08.2007 um 10:58 schrieb Marco van de Voort:

> In gmane.comp.compilers.gpc, you wrote:
>> this is probably a silly newbie question, but I have searched the
>> archives and documentation without much enlightenment for me.
>>
>> I have existing sourcecode, which probably comes from Borland Pascal
>> and uses TObject. Can I use TObject in gpc, or do I have to  
>> replace it
>> with some other object?
>>
>> Is there some comprehensive list of pitfalls when porting Borland
>> stuff over to gpc? Am I better off rewriting it from scratch ;) ?
>
> I can't answer the direct question, but please note that both Borland
> dialects (Turbo Pascal and Delphi) have an TObject. So make sure  
> about which
> one you are talking. A code fragment might help.






More information about the Gpc mailing list