Returns the character that corresponds to an ASCII code.
sChar = Chr (iInt)
| Variable | Description |
|---|---|
| sChar | The returned character. STRING. |
| iInt | The ASCII code to process. INTEGER. |
Chr returns the character string assigned to the code iInt in the ASCII character set. Values outside the range 0 through 255 are invalid.
With Unicode content, Chr returns the character that corresponds to a specified Unicode-character code.
[ ] INTEGER iChar // the value of a character
[ ] STRING sChar // the returned character
[-] testcase chr_example ()
[ ] iChar = 117 // this is the letter "u"
[ ] sChar = Chr (iChar)
[ ] Print ("Character", iChar, "is really '{sChar}'")
[ ] // prints: Character 117 is really 'u'