Einzelnen Beitrag anzeigen

Benutzerbild von Khabarakh
Khabarakh

Registriert seit: 18. Aug 2004
Ort: Brackenheim VS08 Pro
2.876 Beiträge
 
#10

Re: array mit Konstanten erstellen ?

  Alt 7. Aug 2005, 11:58
@idontwantaname: Probier mal das aus :
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
  MyArr: TArray;
  Loop: Integer;
begin
  MyArr := TArray.Create(-10, 2); //!
  for Loop := MyArr.Min to MyArr.Max do
    MyArr.Items[Loop] := Loop;
  ShowMessage('Gefüllt!');
  for Loop := MyArr.Min to MyArr.Max do
    ShowMessage(MyArr.Items[Loop]);
  MyArr.Free;
end;
Sebastian
Moderator in der EE
  Mit Zitat antworten Zitat