trigraphs in X3J11

T. William Wells bill at proxftl.UUCP
Sun May 29 13:57:51 AEST 1988


In article <5215 at ico.ISC.COM>, rcd at ico.ISC.COM (Dick Dunn) writes:

> [lots of stuff demonstrating how trigraphs break existing code].

>     Replacing all the nasty characters with corresponding trigraphs gives:
>
>       if (line??(0??)=='??=' ??!??! line??(0??)=='%') ??<
>               prepro(&line??(1??));
>               linect++;
>       ??>

Ugh.  How horrible.  However, I imagine that few programmers will
actually have to cope with this.  As you suggest, the effort of
using the trigraphs would not be well rewarded; however,
mechanical translation of programs without the trigraphs into
those with trigraphs would permit compilation of existing
programs (and those written offline) on a machine without the
characters.

> A general question:  Has the trigraph mechanism been tried out, in real
> practice, anywhere prior to the introduction in X3J11?  If so, I'd like to
> hear about how it's worked out.

I remember all to well writing APL on a machine that had two
kinds of terminals: those with the APL character set and those
without; digraphs were used for entry using the latter.  I also
remember the intense competition to get the terminals with the
APL set.  BUT, we did write an awful lot of code with the
digraphs.



More information about the Comp.lang.c mailing list