[Gambas-user] VAL()

Benoit Minisini benoit.minisini at ...2...
Thu Apr 27 10:23:32 CEST 2006


On Thursday 27 April 2006 07:38, ron wrote:
> On Wednesday 26 April 2006 23:03, Benoit Minisini wrote:
> > On Wednesday 26 April 2006 20:08, Tuxforall at ...17... wrote:
> > > Hello
> > >
> > > a little problem, val("&Ha000") is not -24576 :)
> > >
> > > Regards
> > >
> > >
> > > gambas 1.9.29
> >
> > And what should be the result?
>
> 40960 may be?
>
> I think he see the argument as always positive value instead signed number
>
> If argument is in hex then add 65536 if result<0
> 40960-65536 = -24576 :)
>
> Ron
>

&HA000 is a negative number. Use &HA000& to get a positive one.

See http://gambasdoc.org/help/cat/constants

-- 
Benoit Minisini





More information about the User mailing list