Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <ctype.h>
    int isascii( int c );

Description:
    The isascii function tests for a character in the range from 0 to 127.

Returns:
    A non-zero value is returned when the character is in the range 0 to
    127; otherwise, zero is returned.

See Also:
    isalpha, isalnum, iscntrl, isdigit, isgraph, islower, isprint, ispunct,
    isspace, isupper, isxdigit, tolower, toupper

Example:
    #include <stdio.h>
    #include <ctype.h>

    char chars[] = {
        'A',
        0x80,
        'Z'
    };

    #define SIZE sizeof( chars ) / sizeof( char )

    void main()
      {
        int   i;

        for( i = 0; i < SIZE; i++ ) {
          printf( "Char %c is %san ASCII character\n",
                chars[i],
                ( isascii( chars[i] ) ) ? "" : "not " );
        }
      }

    produces the following:

    Char A is an ASCII character
    Char   is not an ASCII character
    Char Z is an ASCII character

Classification:
    WATCOM

Systems:
    All

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson