Content deleted Content added
Wassermaus (talk | contribs) |
→Remove trigraphs: Reply Tags: Mobile edit Mobile web edit Advanced mobile edit Reply |
||
Line 395:
Why mention ??!= along with |= or ??( along with < ? These ??-trigraphs are meant to represent characters such as | and < when they are not available in the code page of the hardware. This replacement is ALWAYS done by the preprocessor, not just in operators. -- [[User:Wassermaus|Wassermaus]] ([[User talk:Wassermaus|talk]]) 22:32, 26 October 2023 (UTC)
:At first, this article only mentioned the alternative keyword representations (like <code>or</code>). So, for consistency, I added digraphs since they were added to the standards at the same time and for the same reason. However, adding digraphs but not trigraphs also seemed inconsistent since they can both be used to represent the operators. <code>a??(0??)</code> and <code>a<:0:></code> mean exactly the same thing despite the former being just <code>a[0]</code> after the preprocessor and the latter using alternartive tokens with the same meaning. To a programmer using them it's a distinction without a difference. In addition, <code>a or b</code> is implemented as a keyword in C++ and as a macro in C. So, I argue that there is precedent to adding preprocessor substitutions to the list. And lastly, as you correctly said, trigraphs can also appear outside operators. However, that's also true for the keywords since in e.g. the declaration <code>int and a = 0;</code> the <code>and</code> is not an operator. [[User:Nickps|Nickps]] ([[User talk:Nickps|talk]]) 09:25, 27 October 2023 (UTC)
|