Evidemment Kcc ça lui suffit pas, y voulait 62

Alors, j'ai tenté de créé cette base.
ça marche mais pas avec les gros chiffres

Je comprend pas pourquoi ? (Normal)
Code : Tout sélectionner
; http://www.purebasic.fr/english/viewtopic.php?t=9617&highlight=convert+base
; Code de AlGonzales modifié en base 62 par KCC
#BASEMIN = 2
#BINBASE = 2
#OCTBASE = 8
#HEXBASE = 16
#TRENTESIXBASE = 36
#SOIXANTEDEUXBASE = 62
Procedure.s Int2Base(Value.l, Base.l)
Protected Result.s
If (Base >= #BASEMIN) And (Base <= #SOIXANTEDEUXBASE)
Protected i.l
Repeat
i = (Value % Base) + 1
Value = (Value / Base)
Result = Mid("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", i, 1) + Result
Until Value = 0
EndIf
ProcedureReturn Result
EndProcedure
Procedure.l Base2Int(Value.s, Base.l)
Protected Result.l
Result = 0
If (Base >= #BASEMIN) And (Base <= #SOIXANTEDEUXBASE)
Protected i.l, c.l
For i = 1 To Len(Value)
c = FindString("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", UCase(Mid(Value, i, 1)), 1)
; Return -1 If character is not supported by base
If c > Base
Result -1
Break
EndIf
Result = (Result * Base) + (c - 1)
Next i
EndIf
ProcedureReturn Result
EndProcedure
i = 357427341
Bin.s = Int2Base(i, #BINBASE)
Oct.s = Int2Base(i, #OCTBASE)
Dec.s = Str(i)
Hex.s = Int2Base(i, #HEXBASE)
B62.s = Int2Base(i, #SOIXANTEDEUXBASE)
Debug "Bin or Base 2 = " + Bin
Debug "Oct or Base 8 = " + Oct
Debug "Dec or Base 10 = " + Dec
Debug "Hex or Base 16 = " + Hex
Debug "Base 62 = " + B62
Debug ""
Debug ""
Debug "Bin or Base 2 = " + Str(Base2Int(Bin, #BINBASE))
Debug "Oct or Base 8 = " + Str(Base2Int(Oct, #OCTBASE))
Debug "Dec or Base 10 = " + Dec
Debug "Hex or Base 16 = " + Str(Base2Int(Hex, #HEXBASE))
Debug "Base 62 = " + Str(Base2Int(B62, #SOIXANTEDEUXBASE))
Elle est la bienvenue

Bonne soirée