![]() Chapter Contents |
![]() Previous |
![]() Next |
| isebcdic |
| Portability: | SAS/C extension |
| SYNOPSIS | |
| DESCRIPTION | |
| RETURN VALUE | |
| CAUTION | |
| PORTABILITY | |
| EXAMPLE | |
| RELATED FUNCTIONS | |
| SEE ALSO |
| 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 set\n", candidate,
isebcdic(candidate) ? "belongs" : "does not belong");
}
}
| RELATED FUNCTIONS |
| SEE ALSO |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.