# oct2int

This function converts a single octetstring value to a single integer value.

For the purposes of this conversion, an octetstring shall be interpreted as a positive base 16 integer value. The rightmost hexadecimal digit is least significant, the leftmost hexadecimal digit is the most significant. The number of hexadecimal digits provided shall be multiples of 2 since one octet is composed of two hexadecimal digits. The hexadecimal digits 0 .. F represent the decimal values 0 .. 15 respectively.

Related keyword:

- integer
- octetstring

### oct2int(octetstring value) return integer

Example 1:

const integer c_prednost := oct2int('55'O);

The constant called c_prednost will have the integer value 85. The result will always be positive.