3 ms·
Ancient C didn't have trigraphs. My copy of K+R (1978) doesn't mention them.
by WalterBright 4y ago
Ancient C didn't have trigraphs. My copy of K+R (1978) doesn't mention them.
- kragen 4y agoNo, they were a design error introduced by the ANSI committee.
- krylon 4y agoI thought ISO added them when C went from ANSI C (1989) to ISO C (1990), along with wchar.h and such. I might misremember, though, it's been a long time since I did anything serious with C. Come to think of it, didn't they remove trigraphs in one of the more recent iterations of the standard?
- kragen 4y agoThey did remove trigraphs in one of the more recent iterations. It's possible that it was as you say, but I have this vague memory that it was ANSI who added them. I think maybe what the ISO added were https://en.wikipedia.org/wiki/C_alternative_tokens https://en.wikipedia.org/wiki/C_alternative_tokens.