QBasic / QB64 Discussion Forum      Other Subforums, Links and Downloads
 Return to Index  

ASCII Code Reference Table of all printable characters

February 22 2008 at 10:53 AM
Solitaire  (Login Solitaire1)
S

ASCII is a 7-bit system incorporating 128 characters (0-127). QB uses the ASCII set and an extended IBM set for the 8th bit. (Note: Macintosh computers, at least the older ones, use a different set for the 8th bit.)

ANSI is an 8-bit system which incorporates the first 128 characters and goes up to 256. The last 128 characters may differ from the extended IBM set. Windows programs use the ANSI set rather than the older IBM set for the 8th bit.

The latest languages make use of Unicode, a 16 bit system which incorporates ASCII and ANSI for the first 256 characters, and goes up to over 65,000 characters to include most of the world's languages.

Also check the info in this url:

http://www.robelle.com/smugbook/ansichar.html


The ASCII table is available in the QB Help file, but you may prefer this display instead:

=================================================================

DO
    CLS
    DIM code AS INTEGER
    PRINT " ASCII Display of Printable Characters --  Press any key to continue"
    PRINT " -------------------------------------------------------------------"
    FOR code = 1 TO 6
        PRINT code; "  =  "; CHR$(code), ;
    NEXT code

    PRINT 8; "  =  "; CHR$(8), ;

    FOR code = 14 TO 27
        PRINT code; "  =  "; CHR$(code), ;
    NEXT code

    FOR code = 32 TO 115
        PRINT code; "  =  "; CHR$(code), ;
    NEXT code

    E$ = INPUT$(1)
    PRINT " ASCII Display of Printable Characters --  Press any key to continue"
    PRINT " -------------------------------------------------------------------"

    FOR code = 116 TO 148
        PRINT code; "  =  "; CHR$(code), ;
    NEXT code

    FOR code = 150 TO 221
        PRINT code; "  =  "; CHR$(code), ;
    NEXT code

    E$ = INPUT$(1)
    PRINT

    FOR code = 222 TO 255
        PRINT code; "  =  "; CHR$(code), ;
    NEXT code

    PRINT : PRINT
    PRINT "Press Esc to repeat, any other key to quit...";
    E$ = INPUT$(1)
LOOP WHILE E$ = CHR$(27)
SYSTEM



    
This message has been edited by Solitaire1 on Feb 22, 2008 6:21 PM
This message has been edited by Solitaire1 on Feb 22, 2008 4:42 PM
This message has been edited by Solitaire1 on Feb 22, 2008 11:05 AM


 
 Respond to this message