Asc

String management function.

The Asc function returns the ASCII code of the first character in a specified string.

Syntax

var=Asc(string$)

Parameter

string$, character string.

Return value

var, numeric value: ASCII code of the first character in string$. If string$ is empty or an error occurs, the value 0 is returned.

See also

Chr$

Examples

 

a=Asc("{") 'returns 123

a=Asc("bcdef") 'returns 98 (ASCII code for "b")