Code: Alles auswählen
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Unit2;
type
{ TForm1 }
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
x: x;
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
Var t: x;
begin
a1(t);
end;
end.
Code: Alles auswählen
unit Unit2;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils;
type StrArray = array of String;
IntArray = array of Integer;
x = record
a: StrArray;
b: StrArray;
c: StrArray;
d: StrArray;
end;
procedure a1(var t: x);
implementation
procedure a1(var t: x);
begin
SetLength(t.a , 2);
SetLength(t.b , 2);
SetLength(t.c , 2);
SetLength(t.d , 2);
t.a[0] :='s';
t.b[0] := 's';
t.c[0] := 's';
t.d[0] := 's';
end;
end.