Valid on NetWare, Symbian OS, UNIX, Windows and Windows CE
The asc function converts a character to its corresponding ASCII value or the wide character code of a glyph. If parameter s1 is a string and contains more than one character, the function evaluates the first character only.
This string manipulation function has the format:
Asc(s1 as String) as Integer
Asc(s1 as Char) as Integer
Identifies name of character
The return value is the wide character code value of the input character or the first character of the input string.
Example: Asc function
This example prints the ASCII values of the letters "ABC" on the screen.
Dim OutStr as string
OutStr = Str(Asc("A"))+" "+Str(Asc("B"))+" "+Str(Asc("C"))
Print "AscII Values of the letters in ""ABC"" is: " + OutStr
|
Copyright © 2013 CA.
All rights reserved.
|
|