Thema: Delphi SetLength und type?

Einzelnen Beitrag anzeigen

Benutzerbild von sakura
sakura

Registriert seit: 10. Jun 2002
Ort: München
11.412 Beiträge
 
Delphi 11 Alexandria
 
#9

Re: SetLength und type?

  Alt 15. Dez 2003, 16:22
Zitat von Matze:
Ich kappiere das irgendwie nicht so richtig. Bei mir geht das auch nicht.
Was gibt es denn für eine Fehlermeldung, bei mir geht es einwandfrei

Delphi-Quellcode:
unit Unit1;

interface

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

type
  TStringArray = array of string;

type
  TForm1 = class(TForm)
    ListBox1: TListBox;
  private
    { Private declarations }
  public
    { Public declarations }
    procedure ArrayFuellen(var SomeArray: TStringArray);
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.ArrayFuellen(var SomeArray: TStringArray);
begin
  SetLength(SomeArray, ListBox1.Count);
end;

end.
......
Daniel W.
Ich bin nicht zurück, ich tue nur so
  Mit Zitat antworten Zitat