Asc

From NSB App Studio
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This function is for BASIC compatibility. It is not available in pure JavaScript projects.

Asc(string)

Description

Asc returns the ANSI character code of a character. The required parameter, string, is any valid string expression. If string is longer than one character, only the first character is used.

Example (BASIC)

Rem Asc Example
'Asc returns an ANSI character code

Dim CapitalA, LowerB
CapitalA = Asc("A is for Apple")
Print "Character code for A = " & CapitalA
LowerB = Asc("b")
Print "Character code for b = " & LowerB

Output

Character code for A = 65
Character code for b = 98

Related Items

Chr