Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ncar!gatech!usenet.ins.cwru.edu!usenet!dean From: dean@usenet.INS.CWRU.Edu (Dean Cookson) Newsgroups: comp.lang.c Subject: Re: print % in c Message-ID: <1991Mar4.164022.17217@usenet.ins.cwru.edu> Date: 4 Mar 91 16:40:22 GMT References: <4843@goanna.cs.rmit.oz.au> <1991Feb28.042409.14007@usenet.ins.cwru.edu> <875@oliver.SUBLINK.ORG> Sender: news@usenet.ins.cwru.edu Reply-To: dean@po.CWRU.Edu Organization: Case Western Reserve Univ. Cleveland, Ohio, (USA) Lines: 18 Nntp-Posting-Host: usenet.ins.cwru.edu In article <875@oliver.SUBLINK.ORG> newsuser@oliver.SUBLINK.ORG (Ugo Cei) writes: >I think Richard is right on this one. What he was saying is that the >*compiler* is likely to treat "\%" as "%". Obviously, when *printf* >sees it, it does not know what to do and so it is likely to print >nothing at all. This is true under SCO's rcc, MSC 5.1 and gcc 1.39 >(which indeed gives a warning : "unknown escape sequence `\%'"). >The following line of code will print the `%' under any of the three >mentioned compilers. (I presume Sun cc will do the same.) > Ok, I'll give ya that one. :-) Dean -- | Dean Cookson (Opinions? What opinions??) dean@po.cwru.edu | | Information Network Services DoD #207 AMA #573534 | | Case Western Reserve U. Cleveland, Oh 44106 1981 Honda CB750C | | 216-754-1834 (H) 216-368-2928 (W) 1988 Bianchi Limited |