Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!zaphod.mps.ohio-state.edu!wuarchive!udel!haven!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Special character constants Message-ID: <14868@smoke.brl.mil> Date: 15 Jan 91 22:47:09 GMT References: <1292@mti.mti.com> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 16 In article <1292@mti.mti.com> adrian@mti.UUCP (Adrian McCarthy) writes: >I only have K&R2, not the Standard. On a machine whose character set does >not support special characters like tab and backspace, what happens to >character constants like '\t' and '\b'? Is there some special value they >get set to (e.g., ' ' or '\0') instead? Or is this issue left undefined? A conforming implementation MUST provide distinct character values for these. However, it is not absolutely required to force I/O devices to handle them in the intended way. >I'd like to keep some code I'm writing portable to many machines by using >tabs if they are available and emulating them with spaces if they are not. Just use spaces. If you really have to deal with such variations, there are numerous other environmental variations you should also take care of, and these lie outside the scope of standard C.