Reactor := TFusionReactor.Create;
Zudem sollte Create ein Konstructor sein
Delphi-Quellcode:
type TFReactor = class(TObject)
private
temperature: extended;
pressure: extended;
dbstoff: integer;
firing: boolean;
public
constructor Create;
function Energyproduction(temp, pres: extended; bs: integer): extended;
function DeterminePressure(temp: extended; bs: integer): extended;
function DetermineTemperature(bs: integer; triggerenergy: extended): extended;
function Lawson(temp, pres: extended): extended;
end;
implementation
constructor TFReactor.Create;
begin
inherited;
temperature := 0.0;
pressure := 0.0;
bstoff := 0;
firing := false;
end;