Talk:Digraphs and trigraphs (programming)

Latest comment: 7 months ago by ModernDayTrilobite in topic Requested move 2 March 2024

replaces all occurrences

edit

I very much doubt that this phrase "replaces all occurrences" is correct (my emphasis). For example, it should not replace occurences of that sequence within strings. — Preceding unsigned comment added by Njh@bandsman.co.uk (talkcontribs) 11:26, 2 August 2005 (UTC)Reply

It is correct. — Preceding unsigned comment added by Akihabara (talkcontribs) 05:31, 28 September 2005 (UTC)Reply
Sadly. This is a prime example of design by committee — Preceding unsigned comment added by AlbertCahalan~enwiki (talkcontribs) 06:46, 14 May 2006 (UTC)Reply

escape

edit

Is the \? escape really standard, or just typical? Might there be a compiler that maps it to the 0xfe character or similar? AlbertCahalan 04:06, 23 April 2006 (UTC)Reply

Standard. Akihabara 04:21, 29 November 2006 (UTC)Reply

IOCCC

edit

Should something be added about the more notorious uses of trigraphs (i.e. obfuscation)? Amcfreely 04:07, 23 April 2006 (UTC)Reply

Applicability

edit

When were trigraphs introduced? Do they only apply to ISO C, for instance? Have any other languages adopted them? --82.46.154.93 03:38, 27 November 2006 (UTC)Reply

  • They hark back to the very origins of C. The first edition of K & R refers (in the appendix) to the C compiler having been implemented on four computer platforms, and one of them is the IBM 360/370. Well, that compiler had to implement trigraphs because it was processing EBCDIC! I personally used it, and even had to do maintenance on the very C compiler discussed in the book, back in the early 80's, --Eliyahu S Talk 09:52, 7 December 2009 (UTC)Reply

Redundant digraph

edit

The bit at the bottom on digraphs lists "%:" as a digraph for "#", and "%:%:" as a digraph for "##". Surely the second one is simply two adjacent digraphs?--NeilMitchell 19:55, 16 September 2007 (UTC)Reply

"A digraph [...] must always represent a full token by itself." # and ## are different tokens. --62.224.99.108 14:03, 3 December 2007 (UTC)Reply

Can they or can't they be used?

edit

This sentence is unclear:

The C grammar does not permit two subsequent ? tokens, so the only places in a C file where two question marks in a row may be used are in multi-character constants, string literals, and comments.

The whole article seems to say that trigraphs are, in fact, interpreted within constants, literals, and comments - which would imply that you cannot use two question marks in a row there (unless you want them to be interpreted as introducing a trigraph). But this sentence says you can use them there.

I'm not sure what the author meant to say, but I suspect that this wasn't it. JayLevitt 13:41, 7 November 2007 (UTC)Reply

A token is different from a character. In a-=b], there are three tokens: a, -= (two characters but one token), b. But in a=-b, there are four tokens: a, =, -, b], and in "a--b", there is only one token: "a--b" (six characters, indicating a 5-bit (null-ended) array of characters.
What the sentence is saying is that there is no place in C where a ? token can be immediately followed by another ? token. Inside quotation marks (i.e. multi-character constants or string literals) and inside comments, two subsequent question marks would not be parsed as individual tokens... they would be parsed as part of the string or ignored as part of the comment.
ΨΦorg 13:54, 7 November 2007 (UTC)Reply

Perl section

edit

I don't know Perl, but the Perl section does not seem to deal with di- and trigraph substitution, it's rather more a list of operators. What are those supposed di- and trigraphs replaced with? 221.187.58.252 (talk) 07:01, 27 April 2009 (UTC)Reply

LaTeX section

edit

Are escape characters digraphs in LaTeX ? Snide (talk) 15:05, 29 May 2009 (UTC)Reply

TeX trigraphs

edit

Trigraphs in TeX use a character with category code seven, which is doubled and then followed by one or two additional characters, this is treated as if the corresponding character is found in input. Unlike C, the TeX trigraphs can be very useful sometimes. --zzo38() 04:56, 2 October 2010 (UTC)Reply

Requested move 2 March 2024

edit
The following is a closed discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review after discussing it on the closer's talk page. No further edits should be made to this discussion.

The result of the move request was: moved to Digraphs and trigraphs (programming). Consensus that the topic is not widely described as "multigraphs", but also that it is not the WP:PRIMARYTOPIC for "digraphs and trigraphs"; thus, consensus emerged around "Digraphs and trigraphs (programming)" as a compromise that avoided both issues. I also see a rough consensus to establish the plain title Digraphs and trigraphs as an independent DAB page rather than a redirect to Multigraph (disambiguation). (closed by non-admin page mover) ModernDayTrilobite (talkcontribs) 14:35, 8 April 2024 (UTC)Reply


Digraphs and trigraphsMultigraph (programming) – With Digraphs and trigraphs redirected to Multigraph (disambiguation). Represents a particular application of the Multigraph (orthography) concept, while I think it's fine for the two articles to have the scope they have. Remsense 02:01, 2 March 2024 (UTC) — Relisting. Natg 19 (talk) 17:14, 27 March 2024 (UTC)Reply

Note: WikiProject Computing has been notified of this discussion. Remsense 02:01, 2 March 2024 (UTC)Reply
The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.