up previous next
ascii    --    convert between characters and ascii code


Syntax
ascii(N: INT): STRING
ascii(L: LIST of INT): STRING
ascii(S: STRING): LIST of INT

Description
In the first form, ascii returns the character whose ASCII code is N .

In the second form, ascii returns the string whose characters, in order, have the ASCII codes listed in L .

The third form is the inverse of the second: it returns the ASCII codes of the characters in S .

Example
/**/  ascii(97);
a

/**/  C := ascii("hello world");
/**/  C;
[104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100]

/**/  ascii(C);
hello world