'----------------------------------------------------------------------- ' ASC_CODE.BAS ' ' CIS 120 Lecture Notes example ' Mike Huffman ' Portland Community College, Computer Information Systems ' CIS 120 WINTER TERM 2001 ' ' Last update: 12 FEB 2001 '----------------------------------------------------------------------- CLS ch$ = "A" ' assign "A" to 1-character string code% = ASC(ch$) ' get ASCII character code of ch$ ' display ASCII code in decimal and hex PRINT "ASCII "; ch$; " = "; code%; " Decimal", HEX$(code%); " Hexadecimal"