Einzelnen Beitrag anzeigen

cetinbiryoldayim

Registriert seit: 6. Mai 2008
33 Beiträge
 
#10

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

  Alt 29. Jun 2008, 16:49
Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TBoolArray = Array of TBoolArray;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  strict private
    neuesArray: array[0..2] of TBoolArray;
  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.
Fehler:
[Fehler] Unit1.pas(10): E2086 Typ 'TBoolArray' ist nicht vollständig definiert
[Fehler] Unit1.pas(31): E2010 Inkompatible Typen: 'Array' und 'TBoolArray'
  Mit Zitat antworten Zitat