[ saxa @ 08.10.2011. 14:55 ] @
Pitanje... imam TMemo componentu i u nju kopiram tekst, nakon čega bi na ButtonClick event trebalo izlistat sve riječi iz teksta po redu ( u neku drugu komponentu). Code: procedure TForm1.Button1Click(Sender: TObject); var i : integer; N1 : integer; strS : string; strS1 : string; chZn : char; const ALF =['a'..'z', 'A'..'Z', 'č', 'ć', 'đ', 'š', 'ž', 'Č', 'Ć', 'Đ', 'Š', 'Ž'] ; begin i := 1; strS1 := memo1.Text; strS := ''; N1 := length(strS1); chZn := strS1[i]; while (chZn in ALF) and (N1 <> 0) do begin i := i + 1; strS := strS + chZn; chZn := strS1[i]; ShowMessage('strS: ' + strS); end; (*kraj while strZn in ALF and (i < N) do *) strS1 := RightStr(strS1, length(strS1) - length(strS) - 1); ShowMessage('strS1: ' + strS1); end; end. ovo je kod koji sam napisala ali on ispisuje samo prvu riječ .... KAKO DA GA NATJERAM DA NASTAVI LISTAT/ČITAT hvala! |