Asc: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
<pre> | <pre> | ||
REM ASC Example | REM ASC Example | ||
'ASC returns an ANSI character code | 'ASC returns an ANSI character code | ||
Line 22: | Line 21: | ||
<pre> | <pre> | ||
Character code for A = 65 | Character code for A = 65 | ||
Character code for b = 98 | Character code for b = 98 |
Revision as of 03:44, 29 June 2012
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
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