Holger,
Here is the function I use for conversion.
Anssi
'*************************
Function Hex(ByVal iInput As Integer, ByVal iFormat As Integer) As String
Dim x As Integer
Dim i, iDummy As SmallInt
Dim sGlyph, sOut As String
x = iInput
Do While 1
i=i+1
iDummy = (x/16^(i-1)) Mod 16
Do Case iDummy
Case 10
sGlyph = "A"
Case 11
sGlyph = "B"
Case 12
sGlyph = "C"
Case 13
sGlyph = "D"
Case 14
sGlyph = "E"
Case 15
sGlyph = "F"
Case Else
sGlyph = Str$(iDummy)
End Case
sOut = sGlyph + sOut
If x < 16^i Then
Exit Do
End If
Loop
If iFormat Then
iDummy = iFormat-Len(sOut)
If iDummy > 0 Then
sOut = String$(iDummy,"0") & sOut
Else
sOut = Right$(sOut,iFormat)
End If
End If
Hex = sOut
End Function
'*******************************
----- Original Message -----
From: Holger Sternad <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 19, 2000 10:21 AM
Subject: MI MapBasic: dec to hex
> Hello all,
>
> I know that MapBasic offers a function to convert hexadecimal values into decimal
>numbers. But what
> I am looking for is a way to do the contrary: convert decimal into hexadecimal
>numbers.
> Browsing through the list's archive I found that this question has been posted to
>the list before.
> Unfortunately I didn't find the corresponding answer and my e-mail to the sender of
>the question has
> not reached the recipient.
>
> Any help will be appreciated.
>
> Holger
> [EMAIL PROTECTED]
>
>
> ----------------------------------------------------------------------
> To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]