Talk:Digraphs and trigraphs (programming)

replaces all occurrences
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 (talk • contribs) 11:26, 2 August 2005 (UTC)


 * It is correct. — Preceding unsigned comment added by Akihabara (talk • contribs) 05:31, 28 September 2005 (UTC)


 * Sadly. This is a prime example of design by committee — Preceding unsigned comment added by AlbertCahalan~enwiki (talk • contribs) 06:46, 14 May 2006 (UTC)

escape
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)

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

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

Applicability
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)


 * 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)

Redundant digraph
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)


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

Can they or can't they be used?
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)


 * 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, =, -, <tt>b</tt>], and in <tt>"a--b"</tt>, there is only one token: <tt>"a--b"</tt> (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 <tt>?</tt> token can be immediately followed by another <tt>?</tt> 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)

Perl section
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)

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

TeX trigraphs
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)

Requested move 2 March 2024
<div class="boilerplate mw-archivedtalk" style="background-color: #efe; margin: 0; padding: 0 10px 0 10px; border: 1px dotted #aaa;">
 * 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 (talk • contribs) 14:35, 8 April 2024 (UTC)

Digraphs and trigraphs → Multigraph (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)
 * Note: WikiProject Computing has been notified of this discussion. Remsense  诉  02:01, 2 March 2024 (UTC)

<div style="padding-left: 1.6em; font-style: italic; border-top: 1px solid #a2a9b1; margin: 0.5em 0; padding-top: 0.5em">The discussion above is closed. <b style="color: #FF0000;">Please do not modify it.</b> Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
 * Oppose. When discussing programming languages, they are referred to as digraphs and trigraphs, not multigraphs which is unrecognizable. Web and Books search results for "C trigraph" or "C++ trigraph" make this clear, compared to searches with multigraph. Furthermore, the term "multigraph" in the programming context would likely mean a form of Graph (abstract data type) or related concepts. Adumbrativus (talk) 04:40, 9 March 2024 (UTC)
 * How about Digraphs and trigraphs (programming)? Remsense  诉  05:36, 9 March 2024 (UTC)
 * Ok, yes, sorry, I support that – I'd agree it's not the primary topic. Adumbrativus (talk) 21:34, 9 March 2024 (UTC)
 * It's a little tricky as to how best to handle redirects here–I think Digraphs and trigraphs itself should just be a disambiguation page? Remsense  诉  02:14, 10 March 2024 (UTC)
 * Support move to Digraphs and trigraphs (programming), with disambiguation of the base page name. BD2412  T 03:21, 15 March 2024 (UTC)