Hi James, 

I forgot, Static variables in C++ classes do not have an exact equivalent in
OP, but the can be mimicked with class methods and variable declared within
the module. Thus:-

class MyClass
  procedure SetClassId(AValue: Integer);
  function GetClassId: Integer;
end;

implementation

var AClassId:Integer = 0;

procedure SetClassId.MyClassId( AValue: Integer);
begin
  AClassId:= AValue;
end;
  
function MyClass.GetClassId: Integer;
begin
  result :=  AClassId;
end;


-----Original Message-----
From: James Sugrue [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 26 July 2001 14:44
To: Multiple recipients of list delphi
Subject: [DUG]: Static Vars


I should know this one but, does OP have an equivalent to C's static type ?
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to