isebcdic -- EBCDIC Character Test

SYNOPSIS
#include <lctype.h>
int isebcdic(int c);
DESCRIPTION
isebcdic
tests an integer value c
to determine whether it is a
character belonging to the EBCDIC character set.
RETURN VALUE
isebcdic
returns 0 if the integer is not an EBCDIC character (that
is, if it is not between 0 and 255). If c
is an EBCDIC character,
isebcdic
returns a nonzero value.
CAUTION
Do not assume that isebcdic
returns either 0 or 1.
PORTABILITY
isebcdic
was devised as a replacement for the
isascii
function in an EBCDIC environment. See isascii
for
further information.
EXAMPLE
This example tests for printable EBCDIC characters:
#include <lctype.h>
#include <stdio.h>
void main(void)
{
int count;
int candidate;
for (count = 0; count < 50; count++) {
candidate = rand() / 32;
printf("%d %s to the EBCDIC character setn", candidate,
isebcdic(candidate) ? "belongs" : "does not belong");
}
}
RELATED FUNCTIONS
toebcdic
SEE ALSO
Character Type Macros and Functions