Autor Beitrag
Baphomet
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20


Delphi 7
BeitragVerfasst: So 10.09.06 17:26 
hey leute
also ich habe einen Memotext und will diesein Buchstabe für Buchstabe (mit Lehrzeichen, Sonderzeichen usw.) in einen Array bekommen.

also wenn das jetzt mein Text ist: 'Hallo du'
dass das dann so aussieht

0: H
1: a
2: l
3: l
4: o
5:
6: d
7: u


kann mir dabei jemand helfen?

sry für so ne dumme frage, ich bin noch anfänger

greetz Baph
soisseteben
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 111

Win XP
D7
BeitragVerfasst: So 10.09.06 17:32 
hi,

ausblenden Delphi-Quelltext
1:
2:
For i:=1 to length(deinString) do
  Memo1.Lines.Add(deinString[i]);


denke mal das sollte gehen
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: So 10.09.06 17:36 
Wohl eher andersrum:
ausblenden Delphi-Quelltext
1:
2:
For i:=1 to length(Memo1.Lines.Text) do
  MeinArray[i-1] := Memo1.Lines.text[i];

_________________
Markus Kinzler.
Ironwulf
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 733
Erhaltene Danke: 2



BeitragVerfasst: So 10.09.06 17:39 
ich glaub er meint eher so:
ausblenden Delphi-Quelltext
1:
2:
3:
for i:= 0 to Memo1.Lines.Count  - 1 Do
for j:= 1 to Length(Memo1.Lines[i]) Do
arr[i,j]:= Memo1.Lines[i][j];

das jeder instanz nur ein zeichen enthält
soisseteben
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 111

Win XP
D7
BeitragVerfasst: So 10.09.06 17:39 
Oh, hab ich mich verlesen :(