Einzelnen Beitrag anzeigen

NickelM

Registriert seit: 22. Jul 2007
Ort: Carlsberg
445 Beiträge
 
Delphi 2009 Professional
 
#14

Re: Bool-Array als Rückgabewert einer Funktion??

  Alt 29. Jun 2008, 16:59
versuchs mal so
Delphi-Quellcode:
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;
    procedure Button1Click(Sender: TObject);
  private
    neuesArray: TBoolArray; //oder neuesArray: Array 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
  Result[0] := True;
  Result[1] := True;
  Result[2] := True;
end;

end.
Nickel
  Mit Zitat antworten Zitat