写一个函数获得字符串中=前面的数值,function GetValue(AStr:String;PreEqu:Boolean):Integer;var Index:Integer;begin Index:=Pos('=',AStr); if PreEqu then Result:=StrToInt( Copy(AStr,1,Index-1) ) else Result:=StrToInt( Copy(AStr,Index+1, Length(AStr) ) )end;---------------------通过循环进行排序。Var I,J,K,Value,TmpInt:Integer; S:String;begin for I:=0 to StrList.Count-2 do begin K:=I; Value := GetValue(StrList.Strings[K],True); For J:=I to StrList.Count-1 do begin TmpInt:= GetValue(StrList.Strings[K],True); if TmpInt<Value then begin Value:=TmpInt; K:=J; end; end; if K<>I Then begin S:=StrList.Strings[K]; StrList.Strings[K]:=StrList.Strings; StrList.Strings:=S; end; end;end;----------随手写的,有些地方可能有语法错误。