[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Stange things
[Thread Prev] | [Thread Next]
- Subject: Stange things
- From: Fabien Bodard <gambas.fr@xxxxxxxxx>
- Date: Wed, 11 Sep 2024 16:03:49 +0200
- To: Gambas Mailing List <user@xxxxxxxxxxxxxxxxxxxxxx>
Hi, with this function : Public Sub Base34Decoder(Value As String) As Long Dim lResult As Long Dim iDigitVal, i As Integer Dim aNum As Byte[] = Byte[].FromString(UCase(Value)).Reverse() For i = 0 To aNum.Max iDigitVal = IIf(aNum[i] >= Asc("2") And aNum[i] <= Asc("9"), aNum[i] - 50, aNum[i] - 57) lResult += iDigitVal * (34 ^ i) Next Return lResult End Public sub Main() Print Utils.Base34Decoder("3BG73G") end I get "Dépassement de Capacité" on the line <iDigitVal = IIf(aNum[i] >= Asc("2") And aNum[i] <= Asc("9"), aNum[i] - 50, aNum[i] - 57)> Why ??? Thank you for your help :-) -- Fabien Bodard
Re: Stange things | Gianluigi <gradobag@xxxxxxxxxxx> |
Re: Stange things | Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx> |