[Previous]
[Contents]
[Next]

__iscsymf()

test for a letter or underscore

Synopsis:

#include <ctype.h>
int __iscsymf( int c );

Description:

The __iscsymf() macro tests for a letter or underscore. These characters are valid as the first character in a C identifier. The __iscsym() macro tests for characters that are valid as succeeding characters in a C symbol name.

Returns:

A nonzero value when the character is a letter or underscore; otherwise, zero is returned.

Examples:

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

char chars[] = {'A', 0x80, '_', '9', '+'};

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

void main()
  {
    int   i;

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

produces the output

Char A is a csymf character
Char   is not a csymf character
Char _ is a csymf character
Char 9 is not a csymf character
Char + is not a csymf character

Classification:

WATCOM

Safety:
Interrupt handler Yes
Signal handler Yes
Thread Yes

Caveats:

__iscsym() is a macro.

See also:

isalpha(), isalnum(), iscntrl(), __iscsym(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit(), tolower(), toupper()


[Previous]
[Contents]
[Next]