[Gambas-user] mkinteger..and the reverse function
Ru Vuott
vuott at ...325...
Sat Aug 1 17:49:29 CEST 2015
...or... if you want (to write more code) ....
******
Public Sub Main()
Dim s As String
Dim i As Integer
s = MkInteger(123456)
i = Asc(s, 1)
i += Asc(s, 2) * 256 ' &0100
i += Asc(s, 3) * 65536 ' &010000
i += Asc(s, 4) * 16777216 ' &01000000
Print i
End
******
Regards
vuott
--------------------------------------------
Sab 1/8/15, Benoît Minisini <gambas at ...1...> ha scritto:
Oggetto: Re: [Gambas-user] mkinteger..and the reverse function
A: "mailing list for gambas users" <gambas-user at lists.sourceforge.net>
Data: Sabato 1 agosto 2015, 11:09
Le 01/08/2015 09:40,
Olivier Cruilles a écrit :
> hello,
>
> myInteger =
Cint(val(myString))
>
> Olivier
>
>
>> Le 1 août 2015
à 01:39, nando <nando_f at ...951...>
a écrit :
>>
>>
I'm putting this out there...
>>
>> I'm using
MkInteger$, MkShort$
>>
>> Who knows what the opposite functions
would be. I can't find them
>>
>>
>> myString =
MkInteger$(12345678) 'convert an integer to
a string representation
>> myInteger =
?? (myString) 'convert back to an
integer
>>
>>
anyone?
>> -Nando
>>
No,
its Integer@():
Print
Integer@(MkInteger$(12345678))
12345678
Regards,
--
Benoît Minisini
------------------------------------------------------------------------------
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
More information about the User
mailing list