Hi,
I have a understandig problem:
Hex( 243184193 ) returns the string "E7EB241" - this is correct
HexToDec(Hex( 243184193 )) returns the numeric value 243184193 - this is
correct too
but why
HexToString(HEX(243184193)) doesn't return the string "243184193"?
The Xailer-documentation says:
"Converts an hexadecimal format number (saved in a string) to decimal format
as a string."
Is this a bug in the function or in my brain?
Regards
Ingo
In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
HexToString() problem
HexToString() problem
Hi Ingo,
Ingo escribió:
> The Xailer-documentation says:
> "Converts an hexadecimal format number (saved in a string) to decimal
> format as a string."
>
The help is some confuse, I understand for buffer conversion.-
Local cH2S, cS2H, cbMemBuffer
cbMemBuffer := Chr(15) + Chr(15)
LogDebug( Asc( cbMemBuffer[1] ), Asc( cbMemBuffer[2] ) ) // 15 15
cS2H := StringToHex( cbMemBuffer )
LogDebug( cS2H ) // 0F0F See that it is with format "%02X" for each char
cH2S := HexToString( cS2H ) // 15 15 See that take out format
LogDebug( Asc( cH2S[1] ), Asc( cH2S[2] ) )
// And for numeric/string conversion
LogDebug( Hex( 255 ) ) // ff
LogDebug( HexToDec( 'FF' ) ) // 255
Best regards
Xavi
Ingo escribió:
> The Xailer-documentation says:
> "Converts an hexadecimal format number (saved in a string) to decimal
> format as a string."
>
The help is some confuse, I understand for buffer conversion.-
Local cH2S, cS2H, cbMemBuffer
cbMemBuffer := Chr(15) + Chr(15)
LogDebug( Asc( cbMemBuffer[1] ), Asc( cbMemBuffer[2] ) ) // 15 15
cS2H := StringToHex( cbMemBuffer )
LogDebug( cS2H ) // 0F0F See that it is with format "%02X" for each char
cH2S := HexToString( cS2H ) // 15 15 See that take out format
LogDebug( Asc( cH2S[1] ), Asc( cH2S[2] ) )
// And for numeric/string conversion
LogDebug( Hex( 255 ) ) // ff
LogDebug( HexToDec( 'FF' ) ) // 255
Best regards
Xavi
HexToString() problem
Hi Ingo,
Ingo escribió:
> The Xailer-documentation says:
> "Converts an hexadecimal format number (saved in a string) to decimal
> format as a string."
>
The help is some confuse, I understand for buffer conversion.-
Local cH2S, cS2H, cbMemBuffer
cbMemBuffer := Chr(15) + Chr(15)
LogDebug( Asc( cbMemBuffer[1] ), Asc( cbMemBuffer[2] ) ) // 15 15
cS2H := StringToHex( cbMemBuffer )
LogDebug( cS2H ) // 0F0F See that it is with format "%02X" for each char
cH2S := HexToString( cS2H ) // 15 15 See that take out format
LogDebug( Asc( cH2S[1] ), Asc( cH2S[2] ) )
// And for numeric/string conversion
LogDebug( Hex( 255 ) ) // ff
LogDebug( HexToDec( 'FF' ) ) // 255
Best regards
Xavi
Ingo escribió:
> The Xailer-documentation says:
> "Converts an hexadecimal format number (saved in a string) to decimal
> format as a string."
>
The help is some confuse, I understand for buffer conversion.-
Local cH2S, cS2H, cbMemBuffer
cbMemBuffer := Chr(15) + Chr(15)
LogDebug( Asc( cbMemBuffer[1] ), Asc( cbMemBuffer[2] ) ) // 15 15
cS2H := StringToHex( cbMemBuffer )
LogDebug( cS2H ) // 0F0F See that it is with format "%02X" for each char
cH2S := HexToString( cS2H ) // 15 15 See that take out format
LogDebug( Asc( cH2S[1] ), Asc( cH2S[2] ) )
// And for numeric/string conversion
LogDebug( Hex( 255 ) ) // ff
LogDebug( HexToDec( 'FF' ) ) // 255
Best regards
Xavi
HexToString() problem
Xavi,
yes I see I misunderstood the help totally.
Thank you very much
Ingo
"xAvi" <jarabal_eliminar_no_spam_@gmail.com> schrieb im Newsbeitrag
news:4791edbd$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Hi Ingo,
>
> Ingo escribió:
>> The Xailer-documentation says:
>> "Converts an hexadecimal format number (saved in a string) to decimal
>> format as a string."
>>
>
> The help is some confuse, I understand for buffer conversion.-
>
> Local cH2S, cS2H, cbMemBuffer
>
> cbMemBuffer := Chr(15) + Chr(15)
> LogDebug( Asc( cbMemBuffer[1] ), Asc( cbMemBuffer[2] ) ) // 15 15
>
> cS2H := StringToHex( cbMemBuffer )
> LogDebug( cS2H ) // 0F0F See that it is with format "%02X" for each char
>
> cH2S := HexToString( cS2H ) // 15 15 See that take out format
> LogDebug( Asc( cH2S[1] ), Asc( cH2S[2] ) )
>
> // And for numeric/string conversion
> LogDebug( Hex( 255 ) ) // ff
> LogDebug( HexToDec( 'FF' ) ) // 255
>
> Best regards
> Xavi
yes I see I misunderstood the help totally.
Thank you very much
Ingo
"xAvi" <jarabal_eliminar_no_spam_@gmail.com> schrieb im Newsbeitrag
news:4791edbd$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Hi Ingo,
>
> Ingo escribió:
>> The Xailer-documentation says:
>> "Converts an hexadecimal format number (saved in a string) to decimal
>> format as a string."
>>
>
> The help is some confuse, I understand for buffer conversion.-
>
> Local cH2S, cS2H, cbMemBuffer
>
> cbMemBuffer := Chr(15) + Chr(15)
> LogDebug( Asc( cbMemBuffer[1] ), Asc( cbMemBuffer[2] ) ) // 15 15
>
> cS2H := StringToHex( cbMemBuffer )
> LogDebug( cS2H ) // 0F0F See that it is with format "%02X" for each char
>
> cH2S := HexToString( cS2H ) // 15 15 See that take out format
> LogDebug( Asc( cH2S[1] ), Asc( cH2S[2] ) )
>
> // And for numeric/string conversion
> LogDebug( Hex( 255 ) ) // ff
> LogDebug( HexToDec( 'FF' ) ) // 255
>
> Best regards
> Xavi
HexToString() problem
Xavi,
yes I see I misunderstood the help totally.
Thank you very much
Ingo
"xAvi" <jarabal_eliminar_no_spam_@gmail.com> schrieb im Newsbeitrag
news:4791edbd$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Hi Ingo,
>
> Ingo escribió:
>> The Xailer-documentation says:
>> "Converts an hexadecimal format number (saved in a string) to decimal
>> format as a string."
>>
>
> The help is some confuse, I understand for buffer conversion.-
>
> Local cH2S, cS2H, cbMemBuffer
>
> cbMemBuffer := Chr(15) + Chr(15)
> LogDebug( Asc( cbMemBuffer[1] ), Asc( cbMemBuffer[2] ) ) // 15 15
>
> cS2H := StringToHex( cbMemBuffer )
> LogDebug( cS2H ) // 0F0F See that it is with format "%02X" for each char
>
> cH2S := HexToString( cS2H ) // 15 15 See that take out format
> LogDebug( Asc( cH2S[1] ), Asc( cH2S[2] ) )
>
> // And for numeric/string conversion
> LogDebug( Hex( 255 ) ) // ff
> LogDebug( HexToDec( 'FF' ) ) // 255
>
> Best regards
> Xavi
yes I see I misunderstood the help totally.
Thank you very much
Ingo
"xAvi" <jarabal_eliminar_no_spam_@gmail.com> schrieb im Newsbeitrag
news:4791edbd$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Hi Ingo,
>
> Ingo escribió:
>> The Xailer-documentation says:
>> "Converts an hexadecimal format number (saved in a string) to decimal
>> format as a string."
>>
>
> The help is some confuse, I understand for buffer conversion.-
>
> Local cH2S, cS2H, cbMemBuffer
>
> cbMemBuffer := Chr(15) + Chr(15)
> LogDebug( Asc( cbMemBuffer[1] ), Asc( cbMemBuffer[2] ) ) // 15 15
>
> cS2H := StringToHex( cbMemBuffer )
> LogDebug( cS2H ) // 0F0F See that it is with format "%02X" for each char
>
> cH2S := HexToString( cS2H ) // 15 15 See that take out format
> LogDebug( Asc( cH2S[1] ), Asc( cH2S[2] ) )
>
> // And for numeric/string conversion
> LogDebug( Hex( 255 ) ) // ff
> LogDebug( HexToDec( 'FF' ) ) // 255
>
> Best regards
> Xavi