You can't declare it like that I'm afraid...
the best you could probably do would be
unit X;
interface
TMyClass = class(TObject)
public
AValue :Integer;
constructor Create(AValue :Integer);
end;
var
MyClass :TMyClass;
implementation
constructor TMyClass.Create(AValue :Integer);
begin
inherited Create;
Self.AValue := AValue;
end;
initialization
MyClass := TMYClass.Create(0);
finalization
MyClass.Free;
end;
I tend towards data-driven code a lot and rather than consts I use file, registry,
resource, db or remote sources for the initialisation values of my structures... Of
course sometimes you just want a const ;)
--
Aaron@home
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz