trigraphs in X3J11
robert yaeger
boby at pyuxf.UUCP
Tue Jun 7 02:58:38 AEST 1988
In article <4393 at haddock.ISC.COM>, karl at haddock.UUCP writes:
> >Try writing MVS/c programs using a 3270! Fortunately, the only trigraphs
> >needed are the ??( and ??) ( ie., [ and ] ).
> And what, pray tell, do you see on your terminal if you run the program
> #include <stdio.h>
> main() { printf("??(??)\n"); }
>
The answer is
::
(: is the 3270 representation for an unprintable character).
> >The practice we've adopted is to code trigraphs only when declaring arrays.
> >All references to these arrays in the code use ptr arithmetic.
> I once wrote a program using a certain style because it happened to look
> better on the one printer that was then available. I soon regretted that
> decision.
>
I don't see the connection here, if you decide to use trigraphs instead of
ptr arithmetic then it won't matter what printer you use, the code will
always be ugly, and hard to maintain.
BTW, there other solutions,
1. you can hard code the EBCDIC codes, ie x'ad' and x'bd' but these show
up as unprintables on the 3270 and are also hard to edit after they
are embedded in the source. This is what was done before trigraphs.
2. you can use an APL terminal which does support these characters.
As another posting has pointed out these chars are in EBCDIC but are
not supported on the 3270 terminal.
--
Bob Yaeger
uucp : ...!inhp4!bellcore!pyuxf!boby
phone: 1-201-699-5128
More information about the Comp.lang.c
mailing list