FOR #i := 1 TO #LEN - 1 DO
#min := #i;
FOR #j := #i + 1 TO #LEN DO
IF (#Asc_Des AND #sort_temp[#j] < #sort_temp[#min]) OR (NOT #Asc_Des AND #sort_temp[#j] > #sort_temp[#min]) THEN
// #sort_temp[#j] < #sort_temp[#min],升序
#temp := #sort_temp[#min];
#sort_temp[#min] := #sort_temp[#j];
#sort_temp[#j] := #temp;
END_IF;
END_FOR;
END_FOR;