Borland C++ reference

isalpha

raw OCR

Character classification macro.

Defined in header <ctype.h>

Syntax

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

Portability

DOSUNIXWindowsANSI CC++ only
■■■■

Remarks

isalpha is a macro that classifies ASCII-coded integer values by table lookup. It is a predicate returning nonzero for true and 0 for false. It is defined only when isascii(c) is true or c is EOF.

You can make this macro available as a function by undefining (#undef) it.

Return value

isalpha returns nonzero if c is a letter (A to Z or a to z).

Example

#include <ctype.h>
#include <stdio.h>
int main (void)
(
   char c = 'C ';
if (isalpha(c))
   printf("%c is alphabet ic\n",c);
else
   printf("%c isn't alphabetic\n" ,c);

return 0;

Differences from modern implementations

Nothing recorded yet.

Modern references

These are search links, not yet checked by hand.