Chr Function

Action

Returns the character that corresponds to an ASCII code.

Syntax

sChar = Chr (iInt)
Variable Description
sChar The returned character. STRING.
iInt The ASCII code to process. INTEGER.

Notes

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.

Example

[ ] 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'