Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!djfiander From: djfiander@watnot.UUCP Newsgroups: comp.lang.c Subject: Re: Value of x? Message-ID: <12760@watnot.UUCP> Date: Wed, 1-Apr-87 13:50:16 EST Article-I.D.: watnot.12760 Posted: Wed Apr 1 13:50:16 1987 Date-Received: Fri, 3-Apr-87 06:07:22 EST References: <6570@brl-adm.ARPA> <705@brl-sem.ARPA> Reply-To: djfiander@watnot.UUCP (David Fiander) Organization: U. of Waterloo, Ontario Lines: 26 >> In the Microsoft C compiler V4.0, '\x' is compiled as 0 on the >> grounds that it's a brain-damaged version of '\x00'. This is what >> Microsoft's support group said when I reported what I thought was a >> bug. I claim that '\x' is a perfectly fine representation of the >> character x and should have value 120 base 10. How sayeth INFO-C? > >Neither \x meaning 0 nor \x meaning 'x' is correct. There is no meaning >to \x and those who use it are asking for trouble. By your own admission >\n should be the character n which we all know is not true. I hate to say this, the first of you is more right. According to K&R (which admittedly may no longer be correct) if a '\' is followed by something which is not a valid escape sequence, the '\' is ignored, so the first posting has a valid complaint. This came up here with one of the University's C compilers. They changed it to react in the K&R manner, but give a compile time warning that something was wrong. I tend to agree that '\x' is an 'x' and not a 0. If I wanted 0 then I would say '\x00' (well '\0'). -- "I don't want to achieve immortality through my work. I want to achieve immortality through not dying" - Woody Allen UUCP : {allegra,ihnp4,decvax,utzoo,clyde}!watmath!watnot!djfiander CSNET : djfiander%watnot@waterloo.CSNET