Previous Up Next

6.3.9  String defined by the ASCII codes of its characters: char

The char command translates ASCII codes to strings.


Example.
Input:

char([97,98,99,100])

Output:

"abcd"

Input:

char(97)

Output:

"a"


Note that there are 256 ASCII codes, 0 through 255. If asc is given an integer c not in that range, it will use the integer in that range which equals c modulo 256.
Input:

char(353)

Output:

"a"

because 353−256=97.


Previous Up Next