Skip to content

BASIC ASC$ Function

Sean P. Harrington edited this page Oct 22, 2024 · 1 revision

# DEPRECATED

ASC$

TYPE: plusBASIC String Function


FORMAT: ASC$ ( hexstring )

Action: Convert hex_string to an ASCII string.

  • hexstring is a string containing an even number of hexadecimal digits.
    • Returns a string of length 0 if the length of hexstring is 0.
    • Illegal Quantity results if hexstring contains an odd number of characters or any character is not a hexadecimal digit.

Examples:

10 READ H$ 
20 A$=ASC$(H$)
30 DATA FF

Sets A$ to a ASCII character 255.

PRINT ASC$("30313233")

Prints 0123 -- the ascii characters for hex values 30, 31, 32, and 33.


Clone this wiki locally