C_INTEGER($1) C_STRING(32;$0) ARRAY STRING(1;$_Nb_10;4) ARRAY STRING(1;$_Nb_05;3) C_STRING(32;$Roman_Chiffre) C_LONGINT($Chiffre) C_LONGINT($Arabes_Chiffre) `---------- Initialisation variable --------- $_Nb_10{1}:="I" $_Nb_10{2}:="X" $_Nb_10{3}:="C" $_Nb_10{4}:="M" $_Nb_05{1}:="V" $_Nb_05{2}:="L" $_Nb_05{3}:="D" $Arabes_Chiffre:=$1 `---------- Convertion Chiffre V1 --------- If (($Arabes_Chiffre>0) & ($Arabes_Chiffre<4000)) For ($x1;3;0;-1) $Chiffre:=$Arabes_Chiffre//(10^$x1) If ($Chiffre>=1) $Arabes_Chiffre:=$Arabes_Chiffre-($Chiffre*(10^$x1)) Case of \ ($Chiffre<=3) For ($x2;$Chiffre;1;-1) $Roman_Chiffre:=$Roman_Chiffre+$_Nb_10{$x1+1} End for \ ($Chiffre=9) $Roman_Chiffre:=$Roman_Chiffre+$_Nb_10{$x1+1}+$_Nb_10{$x1+2} \ ($Chiffre=4) $Roman_Chiffre:=$Roman_Chiffre+$_Nb_10{$x1+1}+$_Nb_05{$x1+1} Else $Roman_Chiffre:=$Roman_Chiffre+$_Nb_05{$x1+1} For ($x2;$Chiffre-5;1;-1) $Roman_Chiffre:=$Roman_Chiffre+$_Nb_10{$x1+1} End for End case End if End for $0:=$Roman_Chiffre Else $0:="Error" End if