
#include <lctype.h> int isebcdic(int c);
isebcdic tests an integer value c to determine whether it is a
character belonging to the EBCDIC character set.
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.
isebcdic returns either 0 or 1.
isebcdic was devised as a replacement for the
isascii function in an EBCDIC environment. See isascii for
further information.
#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");
}
}
toebcdic
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.