R = dec2hex(D)
R = dec2hex(D, N)
| Parameter | Description |
|---|---|
| D | a non negative integer smaller than the value returned by flintmax, or a negative value of a signed integer class (int8, int16, int32, int64). |
| N | an integer value. number of digits. |
| Parameter | Description |
|---|---|
| R | result of dec2hex: char array. |
dec2hex converts decimal number to base 16.
A negative value of a signed integer class is converted using the two's complement representation over the native bit width of the type (8, 16, 32 or 64 bits), so dec2hex(int8(-1)) returns 'FF'.
Y = dec2hex(12)
Y = dec2hex(int8(-92))
| Version | Description |
|---|---|
| 1.0.0 | initial version |