ChrB / ChrB$

Function Declaration

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




Long whose value is a code point.

Runtime Semantics.

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

§ If the argument is not in the range 0 to 255, Error Number 6 ("Overflow") is raised.

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

§ Note: the ChrB function is used with byte data contained in a String. Instead of returning a character, which can be one or two bytes, ChrB returns a single byte. The ChrW function returns a String containing the Unicode character except on platforms where Unicode is not supported, in which case, the behavior is identical to the Chr function.