Asc – String Management Function**






Asc Function Example


Description

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")