Hi,
hmm. Irgendwie klappt das nicht was ihr sagt.
high gibt also den Wert -1 am Anfang wieder und somit erstelle ich 0 Einträge.
Jetzt habe ich das genze mal nen bischen Manipuliert aber es klappt trodzdem nciht.
was habe ich also jetzt wieder falsch gemacht?
Delphi-Quellcode:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 =
class(TForm)
Label1: TLabel;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
type bla =
record
a:Integer;
end;
var
Form1: TForm1;
MyArray:
Array of bla;
Temp1: Integer = 0;
// da
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Temp1 := Temp1 + 1;
// da
Setlength(MyArray, Temp1);
MyArray[Temp1].a := Temp1;
label1.Caption := IntToStr(Temp1);
end;
end.
Mfg & Danke im vorraus