🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: (fairly minor) bug in Microsoft C V6

#937
From: Brynn Rogers
Date: Wed, 11 Jul 1990 18:59
24 lines
1582 bytes
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: '^

>     It's not quite what I expected.  And it breaks a whole series of 
>programs I have that use quoted question marks within strings :(

This is not a bug. ANSI C defines a thing called trigraphs for machines or
terminals that don't have some of the less common characters. 
Trigraphs are three character macro like devices that allow you to make
funny characters.  Ex.  ??= is #   ??( is [  ??! is |   and  ??' is ^ .
There are others.

6.0 is trys to be ANSI in every way it can.  Another difference between
5.1 and 6.0 that has given me compiler errors is the fact that the type
of a shift expression now is the same type as the left side of the expression:
(short_v << long_v) is of type short, in 5.1 it would have been a long.

You can still put your ??' in a printf, just type \?\?' or ?\?' .

Brynn
Technical Details
Message-ID: <1814@ux.acs.umn.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!uc!cs.umn.edu!ux.acs!rogers
References: <1829@ns-mx.uiowa.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!uc!cs.umn.edu!ux.acs!rogers
From: rogers@ux.acs.umn.edu (Brynn Rogers)
Newsgroups: comp.sys.ibm.pc.programmer
Subject: Re: (fairly minor) bug in Microsoft C V6
Keywords: Microsoft C V6, bug
Message-ID: <1814@ux.acs.umn.edu>
Date: 11 Jul 90 18:59:00 GMT
References: <1829@ns-mx.uiowa.edu>
Reply-To: rogers@ux.acs.umn.edu (Brynn Rogers)
Organization: University of Minnesota, ACSS
Lines: 24