also bin jetzt bis dahin
Delphi-Quellcode:
function TForm1.Sort(ASrcA, ASrcD: String): Integer;
var
i: Integer;
lResult: Integer;
begin
Result := 0;
for i:=1 to Length(ASrcD) do
begin
for lResult:= CharToInt(ASrcD[i]) to CharToInt(ASrcA[i]) do
OutputDebugString( PChar(ASrcD[i] + ' = ' + IntToStr(lResult)) );
begin
if lResult > 0 then
Result:= i+1;
end;
for lResult:= CharToInt(ASrcA[i]) to CharToInt(ASrcD[i]) do
OutputDebugString( PChar(ASrcA[i] + ' = ' + IntToStr(lResult)) );
begin
if lResult < 0 then
Result:= i-1;
end;
er sortiert zwar aber nicht nach dem alphabet.