Thema: array test

Einzelnen Beitrag anzeigen

davtix

Registriert seit: 29. Mai 2003
Ort: Berlin
87 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#5

AW: array test

  Alt 3. Nov 2013, 15:05
is ja richtig nützlich so n array
Delphi-Quellcode:
type
  TMyArray = array[1..50] of string;
 TMyArray2 = array[1..50] of tpicture;

var
i :integer; a : TMyArray; a2 : TMyArray2;

a[1]:=('pic1');
a[2]:=('pic2');

a2[1]:= form1.image1.Picture;
a2[2]:= form1.image2.Picture;


aBpic := ini.ReadString('image50','pic','');
      for i := 1 to 2 do begin
          if a[i] = aBpic then
             form1.image50.Picture:=a2[i];
      end;

könnte man einem array auch verschiedene werte zuordnen??
also integer bool string und co???

setlength(myarray[1],5);
  Mit Zitat antworten Zitat