DTX()

Top  Previous  Next

 

The DTX() function converts a number to hexadecimal.

 

 

Format

 

DTX(expr {, min.width})

 

where

 

exprevaluates to the number to be converted.

 

min.widthspecifies the minimum number of digits in the converted result.

 

 

The DTX() function converts the supplied expr value to hexadecimal. If the converted value is shorter than min.width, leading zeros are added. Note that DTX() treats the value as an unsigned quantity.

 

 

Examples

 

In each example, the DISPLAY statement is followed by the output that it would produce.

 

DISPLAY DTX(87)

57

 

DISPLAY DTX(87,4)

0057

 

 

See also:

XTD()