Borland C++ reference

toascii

raw OCR

Translates characters to ASCII format.

Defined in header <ctype.h>

Syntax

#include <ctype.h>
int toascii(int c);

Portability

DOSUNIXWindowsANSI CC++ only
■■■

Remarks

toascii is a macro that converts the integer c to ASCII by clearing all but the lower 7 bits; this gives a value in the range 0 to 127.

Return value

toascii returns the converted value of c.

Example

#include <stdio.h>
#include <ctype.h>

int main (void)
{
   int number, result;
   number = 511;
   result = toascii (number);
   printf("%d %d\n", number,  result);
   return 0;

Differences from modern implementations

Nothing recorded yet.

Modern references

These are search links, not yet checked by hand.