das einlesen hab ich soweit fertig - er stoppt nur beim 2. gleichen buchstaben:
Code:
procedure TForm1.Button1Click(Sender: TObject);
var
gtext: array[1..26] of char;
gwort, alpha: string;
a, b, f, x, zaehler: integer;
i: char;
begin
alpha := 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
gwort := Edit1.Text;
b := 0;
f := 1;
for a := 1 to 26 do gtext[a] := ' ';
for zaehler := 1 to length(gwort) do
begin
i := gwort[zaehler];
if i <> ' ' then
begin
x := ord(i);
if (x <= 122) and (x >= 97) then x := x-32;
i := chr(x);
for a := 1 to 26 do
if gtext[a] = i then f := -1;
if f = 1 then begin
b := b + 1;
gtext[b] := i;
end;
end;
memo1.text := gtext;
end;