Contents | Prev | Next

7.2.24 The hex function

Description

The hex function returns the hexadecimal value of the parameter passed to it. The type of the value returned by this function is always string.

Parameter

The hex function's only parameter is the expression of integral type whose value is to be converted to hexadecimal.

Example

   hex(10)   returns  'A'
   hex(16)   returns  '10'
   hex(255)  returns  'FF'

Portability

Operating Systems: All
Standard Pascal: No

Contents | Prev | Next