char/2—produce a string containing a single character with a specified numeric internal representation

The char/2 primitive produces a string containing a single character with a specified  numeric internal representation.

$STRVAL=char($INTVAL)

char/2 arguments

Argument

Mode

Type

Description

$INTVAL

Input

INTEGER

Specifies the integer character code for the single-character string

$STRVAL

Output

STRING

The single character represented by the integer character code, returned as a string

Use char/2 to convert the numeric internal representation specified by $INTVAL into a string returned in $STRVAL. The code is implementation-dependent. It currently is the Unicode code point.

Not every numeric code results in a valid character.

char/2 example

$E.msg = char($E.msg);
Was this page helpful? Yes No Submitting... Thank you

Comments