Re^2: trigraphs

Kim F. Storm storm at texas.dk
Wed Jun 14 08:26:08 AEST 1989


karl at haddock.ima.isc.com (Karl Heuer) writes:
>>... whereas the Danish scheme sounded like "this would be an even better...
>What exactly was the Danish proposal, and in what ways is it alleged to be
>better than the pANS trigraphs?

The Danish proposal intended to provide SIMPLE TO USE alternatives for the
{ } [ ] \ | etc. characters which are not present on many 7 bit terminals
used in Denmark (they represent national danish letters). I.e. it was
intended for DAILY PROGRAMMING using alternative portable representations.

If you would like to kno what a C program looks like on a Danish terminal,
you can get a good approximation by filtering your favourite C source
through the following sed script:

	sed -e 's/{/a/g' -e 's/|/o/g' -e 's/}/e/g' \
	    -e 's/\[/A/g' -e 's/\\/O/g' -e 's/]/E/g'

I think the major obstackle for accepting the Danish proposal was the
use of an infix ! for subscripting, i.e. you would write

	a[5][10]
as
	a!5!10

Using a sufficient amount of parenthesis, this would not cause big problems
It has been implemented in the C++ front-end (I think).

So to summarise, the Danish proposal was not really a replacement for the
trigraphs (although I cannot believe they will ever be used), it was
a proposal to make portable alternatives to the ASCII specific characters
which would be portable WITHOUT conversion.

The reason why I don't believe trigraphs will be used is that as time
has gone by, we (the Danish C programmers) have got used to read other
people's C programs despite the 'funny' presentation on the screens.

Some of us (including myself), are doing so much C programming, that
we normally use a terminal with the ASCII character set, which means
that text written in Danish looks even funnier!  To see what that
looks like, imagine the reverse operation of the above sed script on 
an english text.

The Danish proposal was intended to solve the problem of both groups.

Many other European countries must have the same problems, but for
some reason we have not had much backing from them on this matter.

-- 
Kim F. Storm        storm at texas.dk        Tel +45 429 174 00
Texas Instruments, Marielundvej 46E, DK-2730 Herlev, Denmark
	  No news is good news, but nn is better!



More information about the Comp.std.c mailing list