﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
424	_Dec64()	Albuquerque		"I had a bit of frustration when trying to convert an IPv4 address to the format used by Microsoft SCCM's database table.  To get to the crux of the issue, I needed to convert a full QWORD to an integer number.  The problem is that anything over 0x7FFFFFFF piped into the Dec() function results in a negative number -- seems that the Dec() function assumes input will always be a DWORD.

So, I wrote a stupidly simple converter for my own needs, but thought I'd send this up the food chain to see if it's something you good folks would be interested in...

Further, I'll note that I went cruising through all the include functions and couldn't find one similar to what I needed.  If there really is one in there, I apologize profusely for being redundant -- but could you point me to it?

Here's my stupidly simple AutoIT code (that obviously has none of the correct error checking for ubiquiteous use as-is, but I digress...)

{{{
Func _Dec64($hexValue)
    $intValue = 0
    For $i = StringLen($hexValue) to 1 Step -1
        $intBase = Dec(StringMid($hexValue,$i,1))
        $intExponent = 16 ^ (StringLen($hexValue) - $i)
        $intFinal = $intBase * $intExponent

        $intValue = $intValue + $intFinal
    Next
    Return $intValue
EndFunc ;; _Dec64()
}}}

"	Feature Request	closed		AutoIt		None	Duplicate	QWORD, Hex, Dec	
