Posted by neil Badger on February 11, 2010 at 23:55:44:
In Reply to: Re: IHexDec posted by Jim Guerber on February 11, 2010 at 15:55:30:
According to the Wiki - this is what it does.
IHEXDEC function
Syntax: IHEXDEC(string-argument)
Discussion: The IHEXDEC function converts the string-argument (a string of up to 4 Intel hex formatted bytes) into the equivalent decimal integer value (length.precision = 10.0).
Note: Intel-based systems store numeric data in "Intel hex format."
Windows passes data in this format to Comet and expects the same in return.
This function, along with the DECIHEX function, provide a streamlined way to convert formats.
For example, consider the hex value "@00654321@". In Intel format, this value is "@21436500@". The IHEXDEC function would convert "@21436500@" to the decimal numeric equivalent, 6636321.
Example:
Set TestHex$ = "@21436500@" ! 0x00654321
Set TestDec = 6636321
!
Length 4 & Local Hex$
Length 10.0 & Local Dec
!
Print (Cs);(Et)
!
Hex$ = TestHex$
Dec = IHexDec(Hex$)
If (Dec EQ TestDec)
Print "IHexDec succeeded"
Else
Print "IHexDec failed"
EndIf
!
Hex$ = DecIHex(Dec)
If (Hex$ EQ TestHex$)
Print "DecIHex succeeded"
Else
Print "DecIHex failed"
EndIf
!
Wait
Stop
Just thought I would put in my two bobs worth.
Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.