Hi James
If you are talking about static methods you add 'class' to front of the
declaration and definition.
type
TMyClass = class
FCannotAccess: integer;
class function MyName: string;
end;
class function TMyClass.MyName:string;
begin
result := 'XYZ";
end;
you may calli MyName with either aString := TMyClass.MyName or
AMyClassVar.MyName;
Note: you cannot access FCannotAccess in the class method.
For static local variables (i.e. in routines) see Delphi help on typed
constants.
Cheers Mike
-----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/