Difference between revisions of "ASC"

From QB64 Wiki
Jump to navigation Jump to search
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...")
imported>Odin
Line 7: Line 7:
<source lang="qbasic">
<source lang="qbasic">
PRINT ASC("A")
PRINT ASC("A")
</source
</source>


''Output:''
''Output:''

Revision as of 00:25, 18 July 2017

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.