[Gambas-user] Convert an Hex To integer (Val Function)
Pablo Vera
pvera at ...729...
Tue Sep 20 18:22:11 CEST 2005
What ???
Did you try to convert a negative hex number ?, like:
Val("-&HC3C2&")
this returns: -50114
Or what do you mean ?
Saludos,
Pablo Vera
ariafrancesco at ...86... wrote:
> :-((
>
> Work but only unsigned .
>
> :-((
>
> ---------- Initial Header -----------
>
>>Thaks Pablo .
>>Now my program works .
>>
>>I'm near to implemts the modbus protocol on Gambas.
>>For the moment i can read from a Serial modbus net (RS485).
>>Last step is implemt write OP (50% of the work is done)
>>
>>Thanks to all :-))
>>
>>---------- Initial Header -----------
>>
>>>Put an ampersand at the end, like this:
>>>
>>> Val("&HC3C2&")
>>>
>>>it returns 50114.
>>>
>>>Saludos,
>>>Pablo Vera
>>>__________________________________________________________1
>>>
>>>ariafrancesco at ...86... wrote:
>>>
>>>>Why the function :
>>>>
>>>>Val("&HC3C2") respond with -15422 (a short)
>>>>when the correct value is 50114 (an integer) ??
>>>>
>>>>How can I convert an Hex like C3C2 in an Integer ??
More information about the User
mailing list