CARM User's Guide

Discontinued

toascii

Summary
#include <ctype.h>

int toascii (
  int c);      /* character to convert */
Description

The toascii macro converts c to a 7-bit ASCII character. This macro clears all but the lower 7 bits of c.

Return Value

The toascii macro returns the 7-bit ASCII character for c.

See Also

toint

Example
#include <ctype.h>
#include <stdio.h> /* for printf */

void tst_toascii ( char c) {
  char k;

  k = toascii (c);
  printf ("%c is an ASCII character\n", k);
}