Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Exit statement in constructor
Mon, Jan 28 2019 1:59 AMPermanent Link

Michael Dreher

When applying an exit statement in a constructor I get a runtime
error. Example:

type
 TMyClass = class(TObject) public
   constructor Create; override;
 end;

implementation

constructor TMyClass.Create;
begin
 inherited Create;
 exit; // <--- "$r" is undefined
end;

initialization
 TMyClass.Create;

Michael Dreher
Tue, Jan 29 2019 11:20 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Michael,

<< When applying an exit statement in a constructor I get a runtime error. >>

Thanks, I'll check it out.

Tim Young
Elevate Software
www.elevatesoft.com
Image