No subject


Thu Oct 26 19:20:09 CEST 2017


To          : gambas-user at lists.sourceforge.net
Cc          :
Date      : Tue, 20 Sep 2005 11:22:11 -0500
Subject : Re: [Gambas-user] Convert an Hex To integer (Val Function)

> What ???
>
> Did you try to convert a negative hex number ?, like:
>
>    Val("-&HC3C2&")
>
> this returns: -50114
> =0D
> Or what do you mean ?
>
> Saludos,
> Pablo Vera
>
> ariafrancesco at ...86... wrote:
> > :-((
> >
> > Work but only unsigned .
> > =0D
> > :-((
> >
> > ---------- 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 ??
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server.
> Download it for free - -and be entered to win a 42" plasma tv or your very
> own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> 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