Page 1 of 1 1
Topic Options
#206555 - 2013-01-10 07:25 PM Value represented in hex
Seppe Offline
Fresh Scripter

Registered: 2013-01-09
Posts: 7
Loc: Tenerife
Hi all,

I expected that KixTart would display &FFFFFFF0 as -15, but it displays -241.
(As if i would have typed &FFFFFF0F).
Do i miss something?
Seppe

Top
#206556 - 2013-01-10 08:25 PM Re: Value represented in hex [Re: Seppe]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I might be mistaken but my bet is that kixtart does unsigned to uint first and then to int.
hence, when use say &FFFFFFF0, kixtart reads it as &FFFFFF0, or something like that. anyhow, some sort of overflow seems to be going on.
just my guess.
_________________________
!

download KiXnet

Top
#206557 - 2013-01-10 08:44 PM Re: Value represented in hex [Re: Lonkero]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
Welcome to KORG..

Check out this post for a UDF that can convert numbers beyond 7fffffff. You might be able to use the logic in reverse to convert large hex values to decimal.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 515 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.05 seconds in which 0.024 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org