Share via


6.1.2.11.1.4 Chr / Chr$

Function Declaration

 Function Chr(CharCode As Long) As Variant  
 Function Chr$(CharCode As Long) As String  

Parameter

Description

CharCode

Long whose value is a code point.

Runtime Semantics.

§ Returns a String data value consisting of a single character containing the character whose code point is the data value of the argument.

§ If the argument is not in the range 0 to 255, Error Number 5 ("Invalid procedure call or argument") is raised unless the implementation supports a character set with a larger code point range.

§ If the argument value is in the range of 0 to 127, it is interpreted as a 7-bit ASCII code point.

§ If the argument value is in the range of 128 to 255, the code point interpretation of the value is implementation defined.

§ Chr$ has the same runtime semantics as Chr, however the declared type of its function result is String rather than Variant.