Jump to content
Sign in to follow this  
quixote79

To convert DEC

Recommended Posts

quixote79

Msgbox(0, "", DEC("CEBDC6BE"))

I think the result may be 3468543678 but AutoIt said -826423618.

What's wrong??

Edited by quixote79

Share this post


Link to post
Share on other sites
LxP

This has to do with the size of the number. From the help file:

Integers (whole numbers) can also be represented in hexadecimal notation by preceding the integer with 0x as in 0x409 or 0x4fff (when using hex notation only 32-bit numbers are valid).

What this means is that the largest number available in hex notation is 0x7FFFFFFF (or 2147483647 in decimal). 0x80000000 through to 0xFFFFFFFF are reserved for negative numbers (where 0xFFFFFFFF is -1, 0xFFFFFFFE is -2 etc.).

Share this post


Link to post
Share on other sites
quixote79

This has to do with the size of the number. From the help file:

What this means is that the largest number available in hex notation is 0x7FFFFFFF (or 2147483647 in decimal). 0x80000000 through to 0xFFFFFFFF are reserved for negative numbers (where 0xFFFFFFFF is -1, 0xFFFFFFFE is -2 etc.).

<{POST_SNAPBACK}>

Then there is no way to get 3468543678? Edited by quixote79

Share this post


Link to post
Share on other sites
quaizywabbit

Then there is no way to get 3468543678?

<{POST_SNAPBACK}>

from Help file for DEC function:

Remarks

The function only works with numbers that fit in a 32 bit signed integer (-2147483648 to 2147483647)

anything beyond that range will require custom coding.


[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×