Keil Logo

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);
}
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.