Chr Function

Top  Previous  Next

 

Function:

Returns the string that consists of a single character with ASCII code asciicode.

Syntax:

chr(asciicode as byte) as string

See Also:

Asc

 


Part

Description

asciicode

ASCII code of the character to return.

Details

It is also possible to use this function within string definitions, as shown in the example below.

Examples

 

dim x as byte

dim s as string

 

x=49

s = chr(x) ' result will be '1'

s = "FooBar" + chr(13) ' would add a carriage return to the end of the string