Why are there digraphs in C and C++?

后端 未结 4 1573
情深已故
情深已故 2020-11-28 06:55

I learned today that there are digraphs in C99 and C++. The following is a valid program:

%:include 

%:ifndef BUFSIZE
 %:define BUFSIZE  512         


        
4条回答
  •  南方客
    南方客 (楼主)
    2020-11-28 07:22

    I believe that their existence can be traced back to the possibility that somewhere, somebody is using a compiler with an operating system whose character set is so archaic that it doesn't necessarily have all the characters that C or C++ need to express the whole language.

    Also, it makes for good entries in the IOCCC.

提交回复
热议问题