3.5.5.1 Asc

Description

This function returns the ASCII code (decimal) for the first character in an input string. This function does the same thing as the code function.

Syntax

int asc(string str$)

Parameter

str

Is a string of characters

Return

Returns the ASCII code for the first character.

Example

aa = asc("$100");
aa = ; //returns 36, the ASCII code of character "$"
bb$ = "Abc";
asc(bb$)=; //returns 65, the ASCII code of uppercase letter "A"