CHR


Returns a string of characters from one or more ASCII integer values

Syntax:
declare function Chr ( byval ch as integer [, ... ] ) as string

Usage:
result = Chr[$]( ch0 [, ch1 ... chN ] )

Parameters:
ch
The ASCII integer value of a character.

Return Value:
Returns a string containing the character(s).

Description:
Chr returns a string containing the character(s) represented by the ASCII values passed to it.

When Chr is used with numerical constants or literals, the result is evaluated at compile-time, so it can be used in variable initializers.

ASC performs the opposite function, returning the ASCII code of a character represented by a string.

Examples:
Print "the character represented by";
Print " the ASCII code of 97 is: "; Chr(97)

Print Chr(97, 98, 99) ' prints abc

' s initially has the value "abc"
Dim s As String = Chr(97, 98, 99)

Print s


Dialect Differences:
Differences from QB:
See also:
Back to String Functions
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode