L’intérêt d'une procédure dans ce cas précis est de pouvoir pousser la comparaison.
Sinon un if a$<>b$ suffit effectivement

Code:
Procedure.s CompareString(StringA.s,StringB.s,ModeCompare = 1)
Shared ReZult.s
#COMP_Basic = 1
#COMP_Lenght = 2
If ModeCompare <1 Or ModeCompare >2
ProcedureReturn "Erreur de mode"
EndIf
Select ModeCompare
Case #COMP_Basic
If StringA = StringB
ReZult = "Identique"
Else
ReZult = StringA +" <> "+ StringB
EndIf
Case #COMP_Lenght
LA = Len(StringA)
LB = Len(StringB)
If LA > LB
ReZult = StringA + " > " + StringB
ElseIf LB > LA
ReZult = StringB + " > " + StringA
ElseIf LA = LB
If StringA = StringB
ReZult = "Identique"
Else
ReZult = "Longueur identique mais mots différents"
EndIf
EndIf
EndSelect
ProcedureReturn ReZult
EndProcedure
Debug "test 1"
Debug CompareString("Toto","Tutu" , #COMP_Basic)
Debug "test 2"
Debug CompareString("Toto","Tutu" , #COMP_Lenght)
Debug "test 3"
Debug CompareString("Toto","Toto" , #COMP_Basic)
Debug "test 4"
Debug CompareString("Toto","Toto" , #COMP_Lenght)
On pourrait ajouter plein d'autres Flag comme #COMP_Case pour montrer que les 2 termes sont identiques mais pas la Case etc...