IBM Lotus Symphony
|
Returnerer en streng som representerer den heksadesimale verdien av et tall.
Hex (Tall)
Streng
Tall: Et numerisk uttrykk som du vil konvertere til et heksadesimalt tall.
Sub ExampleHex
REM bruker BasicFormulas i Lotus® Symphony™ Spreadsheets
Dim a2, b2, c2 as String
a2 = "&H3E8"
b2 = Hex2Int(a2)
MsgBox b2
c2 = Int2Hex(b2)
MsgBox c2
End Sub
Function Hex2Int( sHex As String ) As Long
REM Returnerer et langt heltall fra en heksadesimal verdi.
Hex2Int = clng( sHex )
End Function
Function Int2Hex( iLong As Long) As String
REM Beregner en heksadesimal verdi til heltall.
Int2Hex = "&H" & Hex( iLong )
End Function