Special character constants

Karl Heuer karl at ima.isc.com
Thu Jan 17 07:01:33 AEST 1991


In article <1292 at mti.mti.com> adrian at mti.UUCP (Adrian McCarthy) writes:
>On a machine whose character set does not support special characters like tab
>and backspace, what happens to character constants like '\t' and '\b'?

The character constants get unique values no matter what.  I would expect that
on a tabless system the stdio library would convert '\t' into the appropriate
number of spaces when writing to a terminal.  (I thought it might even do this
for all text streams, but the standard says that filtering through a text
stream preserves tabs as well as newlines and printable characters.  Note that
backspace and other control characters do not share this property.)

Karl W. Z. Heuer (karl at ima.isc.com or uunet!ima!karl), The Walking Lint



More information about the Comp.lang.c mailing list