Fail¶
Fail a constructor.
See also¶
| Name | Description |
|---|---|
| TypeOf | Return pointer to VMT of an object. |
| New | Dynamically allocate memory for variable. |
| Initialize | Initialize memory block using RTTI. |
| Finalize | Finalize (clean up) memory block using RTTI. |
Example¶
program testfail;
{$mode objfpc}
Type
TMyClass = Class
Constructor Create;
end;
Constructor TMyClass.Create;
begin
Fail;
end;
var
M : TMyClass;
begin
M:=TMyClass.Create;
Writeln('M is nil : ',Not Assigned(M));
end.