unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TBoolArray =
Array of Boolean;
type
TForm1 =
class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
strict private
neuesArray:
array[0..3]
of boolean;
public
function gibArray(): TBoolArray;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
neuesArray := gibArray();
end;
function TForm1.GibArray(): TBoolArray;
begin
SetLength(Result, 3);
Result[0] := True;
Result[1] := True;
Result[2] := True;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
showmessage(BoolToStr(neuesArray[0])+'
'+BoolToStr(neuesArray[1])+'
'+BoolToStr(neuesArray[2]));
end;
end.