ASC

From QB64 Wiki
Revision as of 00:25, 18 July 2017 by imported>Odin (Created page with "The '''ASC''' function returns the '''ASC'''II code at the specified position in a string. == Syntax == code% = '''ASC'''(text$[, position&]) == Example == <source lang="qba...")
Jump to navigation Jump to search

The ASC function returns the ASCII code at the specified position in a string.

Syntax

code% = ASC(text$[, position&])

Example

<source lang="qbasic"> PRINT ASC("A") </source

Output:

65

Details

If position& isn't passed, ASC returns the ASCII code of the leftmost character.