home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!sdd.hp.com!elroy.jpl.nasa.gov!nntp-server.caltech.edu!eql.caltech.edu!rankin
- From: rankin@eql.caltech.edu (Pat Rankin)
- Newsgroups: comp.lang.c
- Subject: Re: Questions about token merging and trigraphs
- Date: 19 Dec 1992 19:53 PST
- Organization: California Institute of Technology
- Lines: 36
- Distribution: world
- Message-ID: <19DEC199219532084@eql.caltech.edu>
- References: <1TA04FH@cdis-1.compu.com> <XZo2VB1w165w@quest.UUCP>
- NNTP-Posting-Host: eql10.caltech.edu
- Summary: time to worry about digraphs, not trigraphs
- Keywords: trigraph digraph
- News-Software: VAX/VMS VNEWS 1.41
-
- There's not much point arguing about trigraphs now, so long after
- the fact. They cannot be removed until 1999 at the earliest. However
- there is apparently a similar issue which is currently relevant: the ISO
- committee's consideration of adding _digraphs_ (not to replace trigraphs,
- but in addition to them). My only information is hearsay and comes from
- assorted postings in this group and/or comp.std.c.
-
- In article <XZo2VB1w165w@quest.UUCP>, srhqla!quest!kdq writes...
- [ lots of text deleted; this is reportedly a direct quote from the
- ANSI rationale document, which is not part of the actual standard: ]
- > "...The obvious idea of defining two-character escape sequences fails
- > because C uses all the characters which _are_ in the ISO 646 repetoire:
- > no single escape character is available. The best that can be done is
- > to use a _trigraph_ - an escape digraph followed by a distinguishing
- > character."
-
- Apparently [a majority of?] the current members of the ANSI committee
- don't agree with that any more, if the report that they've decided to stop
- actively opposing digraphs is accurate. If the proposed set of digraphs
- affects string literals--I'm not sure, since I don't have all the phases
- of compilation memorized, nor a list handy--then at least one of them is
- certain to cause problems under VMS. Angle brackets ("<",">") are valid
- alternate delimiters for directory names--inherited from TOPS-10 or TOPS-20,
- precisely because the normal square bracket ("[","]") delimiters are not
- available on some non-ASCII terminals and printers--and *printf format
- strings which reference "<%" (proposed digraph for "{") do exist. Consider
- sprintf(file_specification, "%s:<%s>%s.%s;%d",
- device, directory, basename, filetype, version_number);
- or the analogous *scanf call for picking a fully-qualified name apart.
- I imagine some Unix programs which construct command strings for system()
- have similar occurances of "<%s" for redirecting the standard input stream.
- This would not be a relatively harmless affect on message text, but a major
- breakage for some small but non-zero pecentage of code. Of course if
- digraphs don't apply to string literal processing then this is a moot point...
-
- Pat Rankin, rankin@eql.caltech.edu
-