qbasic.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
ASC, CHR$ Functions
  Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
ASC returns the ASCII code for the first character in a string expression.
CHR$ returns the character corresponding to a specified ASCII code.
 
ASC(stringexpression$)
CHR$(ascii-code%)
 
    ■ stringexpression$    Any string expression.
    ■ ascii-code%          The ASCII code of the desired character.
 
Example:
    PRINT ASC("Q")    'Output is:  81
    PRINT CHR$(65)    'Output is:  A
 
See Also    ASCII Character Codes