Function FP_Tri(Arg As Variant) As Variant
Dim tablo, i, j, temp
If InStr(1, Arg, ",") <> 0 Then
tablo = Split(Arg, ",")
For i = 0 To UBound(tablo)
For j = i To UBound(tablo)
If tablo(j) < tablo(i) Then
temp = tablo(j)
tablo(j) = tablo(i)
tablo(i) = temp
End If
Next
Next
FP_Tri = ""
For i = 0 To UBound(tablo)
FP_Tri = IIf(i = 0, tablo(i), FP_Tri & ", " & tablo(i))
Next
Else
FP_Tri = "Tri Impossible"
End If
End Function
Function FP_Tri5$(Args$)
Dim Arg$(), i%, j%, Tmp$
' Séparation des arguments.
Arg = Split(Args, ",")
' Classement des arguments.
For i = 0 To UBound(Arg) - 1
Tmp = Arg(i)
For j = i To UBound(Arg)
If Tmp > Arg(j) Then Arg(i) = Arg(j): Arg(j) = Tmp: Tmp = Arg(i)
Next
Next
' Renvoi des arguments classés.
FP_Tri5 = Join(Arg, ",")
End Function