Conversion Operators

A conversion operator converts from one data type to another.

Decimal to Character Conversion

Syntax: x = a

Description: Sets x to the character with unicode code point a.

Exceptions:

  • Invalid operand
    1. if the number in a is not a Unicode code point in the Basic Multilingual Plane (BMP) or the surrogate code points, i.e. if the value is not 16-bit.
    2. if the number in a is not a whole number (implied by i.)
    3. if the number in a is a negative number (implied by i.)

Relaxations:

  • Exception

Character to Decimal Conversion

Syntax: x = a

Description: Sets x to the unicode code point of a. The value is in the Basic Multilingual Plane (BMP) or one of the surrogate code points.