Syntax
#include <ctype.h> int _iscsym(int c); int _iscsymf(int c);
These macros test if an integer is within a particular ASCII set. The macros assume that the system uses the ASCII character set.
_iscsym tests if a character is alphabetic, a digit, or an underscore (_). _iscsymf tests if a character is alphabetic or an underscore. Returns
This example uses _iscsym and _iscsymf to test the characters a, _, and 1. If the character falls within the ASCII set tested for, the macro returns TRUE. Otherwise, it returns FALSE.
#include <stdio.h>
#include <ctype.h>
int main(void)
{
   int ch[3] =  { 'a','_','1' };
   int i;
   for (i = 0; i < 3; i++) {
      printf("_iscsym('%c') returns %s\n", ch[i], _iscsym(ch[i])?"TRUE":"FALSE");
      printf("_iscsymf('%c') returns %s\n\n", ch[i], _iscsymf(ch[i])?"TRUE":
         "FALSE");
   }
   return 0;
   /****************************************************************************
      The output should be:
      _iscsym('a') returns TRUE
      _iscsymf('a') returns TRUE
      _iscsym('_') returns TRUE
      _iscsymf('_') returns TRUE
      iscsym('1') returns TRUE
      iscsymf('1') returns FALSE
   ****************************************************************************/
}
Related Information