🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #964

Re: (fairly minor) non-bug in Microsoft C6.0

#964
From: Russ Poffenberger
Date: Thu, 12 Jul 1990 15:53
28 lines
1805 bytes
In article <1990Jul11.175340.12779@granite.cr.bull.com> buck@granite.cr.bull.com (Kenneth J. Buck) writes:
>In article <1829@ns-mx.uiowa.edu> cmdglv@vaxa.weeg.uiowa.edu writes:
>>      Here's a fun little bug that I just discovered in Microsoft C V6.0.
>>             printf("Question marks: '??'");
>>      I get the following output:
>                      Question marks: '^
>
>Aaahh! but not a bug, I'm afraid...
>Note on page 424 of TFM (MSC Advanced Programming Techniques manual),
>in the section B.1.7 titled Trigraphs, it is mentioned that the character
>sequence ??' translates into the circumflex character.  This is included 
>in the ANSI standard for Trigraph sequences.  Sorry, but you'll have to
>change your program.
>
>Note:  one way to do this is to use the string concatenation feature, as in:
>       printf ("Question marks: '?" "?'");


The more approved way in 'C' is to use the '\' escape character to force the
character you want. ie

printf ("Question marks: '\?\?'");


Russ Poffenberger               DOMAIN: poffen@sj.ate.slb.com
Schlumberger Technologies       UUCP:   {uunet,decwrl,amdahl}!sjsca4!poffen
1601 Technology Drive		CIS:	72401,276
San Jose, Ca. 95110             (408)437-5254
Technical Details
Message-ID: <1990Jul12.155336.20993@sj.ate.slb.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!ut-emx!linus!sjsca4!poffen
References: <1829@ns-mx.uiowa.edu> <1990Jul11.175340.12779@granite.cr.bull.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!ut-emx!linus!sjsca4!poffen
From: poffen@sj.ate.slb.com (Russ Poffenberger)
Newsgroups: comp.sys.ibm.pc.programmer
Subject: Re: (fairly minor) non-bug in Microsoft C6.0
Keywords: Microsoft C V6, bug
Message-ID: <1990Jul12.155336.20993@sj.ate.slb.com>
Date: 12 Jul 90 15:53:36 GMT
References: <1829@ns-mx.uiowa.edu> <1990Jul11.175340.12779@granite.cr.bull.com>
Reply-To: poffen@sj.ate.slb.com (Russ Poffenberger)
Organization: Schlumberger Technologies, San Jose, CA.
Lines: 28