Code: Alles auswählen
unit unitA;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, unitb;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
procedure TForm1.FormCreate(Sender: TObject);
var
vTC:TC;
begin
[size=150] vTC:=TC.Create;[/size]
end;
end.
Code: Alles auswählen
unit unitb;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils;
type
TA = class
private
F1: String;
F2: Integer;
public
constructor Create;
end;
TB = class
private
F3: String;
F4: Integer;
public
constructor Create;
end;
TC = class
private
FA: ^TA;
FB: ^TB;
public
constructor Create;
end;
implementation
constructor TA.Create;
begin
F1 := 'F1';
F2 := 2;
end;
constructor TB.Create;
begin
F3 := 'F3';
F4 := 4;
end;
constructor TC.Create;
begin
[size=150] FA^ := nil;
FB^ := nil;[/size]
end;
end.