<分区>
谁知道++ 后缀和后缀形式的起源和原因。我知道它们甚至在 C 中也可用。但是谁发明了它们;甚至用其他语言?
<分区>
谁知道++ 后缀和后缀形式的起源和原因。我知道它们甚至在 C 中也可用。但是谁发明了它们;甚至用其他语言?
最佳答案
来自 Dennis M. Ritchie,The Development of the C Language , HOPL II, 1993:
For example, B introduced generalized assignment operators, using x=+y to add y to x. The notation came from Algol 68 [Wijngaarden 75] via McIlroy, who had incorporated it into his version of TMG. (In B and early C, the operator was spelled =+ instead of += ; this mistake, repaired in 1976, was induced by a seductively easy way of handling the first form in B's lexical analyzer.)
Thompson went a step further by inventing the ++ and -- operators, which increment or decrement; their prefix or postfix position determines whether the alteration occurs before or after noting the value of the operand.
关于c# -++后缀和前缀的由来,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28326342/