Autor Beitrag
Molzer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: Sa 03.01.09 01:24 
hallo!

bin anfänger und würde gerne wissen ob mein ansatz der richtige ist, funkt leider net..
nach button1click sollen 4 zahlen eingelesen und in einem array gespeichert werden

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
z : array[1..4] of integer;
procedure TForm2.Button1Click(Sender: TObject);
  begin
  try
  for i := 1 to 4 do
  StringGrid1.Cells[i,0](strtoint(z(i)));
  except on EConvertError do
  showmessage ('Ungültige Eingabe');
  end;
Dunkel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 682

Mac OS X Snow Leopard
Xcode 3.1
BeitragVerfasst: Sa 03.01.09 01:36 
Hallo!

Du möchtest dem Array z an Stelle i einen Wert zuweisen. Zuweisungen funktionieren in Delphi durch den Zuweisungs-Operator :=. Probier es mal mit z[i]:= StrToInt(StringGrid1.Cells[i,0]);.

_________________
Ich streite einsam mich mit dieser Oberflächenwelt
Gutes sei ein löblich Brot von dem ich zehre - bis zum Tod [Das Ich - Im Ich]
Molzer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: Sa 03.01.09 10:12 
Na klar!!!!

Danke!!