Thema: Delphi Array Index-Problem

Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#1

Array Index-Problem

  Alt 11. Dez 2006, 16:07
Hi,

Also entweder steh ich grad sowas von mega aufm Schlauch oder das hier ist komisch -.-

Delphi-Quellcode:
for y:= 0 to High(LGS.Bla) do begin
 LGS.Ext[y] := StrToInt(Stringgrid2.Cells[0,y]); // unwichtig
 for x:= 0 to High(LGS.Bla[y]) do begin
   LGS.Bla[y][x] := StrToInt(Stringgrid1.Cells[y,x]);
Wenn jetzt im Stringgrid steht

0 1
2 3

dann soll

Bla[0][0] = 0
Bla[0][1] = 1
Bla[1][0] = 2
Bla[1][1] = 3

sein.. Das müsste doch auch eig nach dem Code so werden oder ? -.-
Aber es ist so:

Bla[0][0] = 0
Bla[0][1] = 2
Bla[1][0] = 1
Bla[1][1] = 3

....

Gruß
Neutral General
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat