Chr

This function converts an ASCII character code to its associated character.

Syntax

Chr(charcode)

Parameters

charcode
Number that identifies a character.

Return Values

Returns a character.

Remarks

Numbers from 0 through 31 are the same as standard, nonprintable ASCII codes. For example, Chr(10) returns a line feed character.

Use ChrB with byte data contained in a string. Instead of returning a character, which may be one or two bytes, ChrB always returns a single byte. ChrW is provided for 32-bit platforms that use Unicode characters. Its parameter is a Unicode (wide) character code, thereby avoiding the conversion from ASCII to Unicode.