Hex$ Function

Purpose

Converts an integer expression to hexadecimal representation.

Syntax

string = Hex[$](m[,n])

Description

After conversion the hexadecimal representation of integer expression m is returned as a plain string.

The parameter n is optional and determines how many places should be used to represent the number. If n is greater than the number of places needed to represent m the converted number is padded with leading zeros.

Example

Debug.Show

Trace Hex$(25)      // Prints 19

Trace Hex$(1001, 6) // Prints 0003E9

See Also

Bin$(), Oct$(), Dec$()

{Created by Sjouke Hamstra; Last updated: 09/10/2014 by James Gaite}