标记的计算Evaluation of Tokens

当编译器解释标记时,它在移到下一个标记之前,会在单个标记中包括尽可能多的字符。When the compiler interprets tokens, it includes as many characters as possible in a single token before moving on to the next token. 由于此行为,编译器可能不会按预期方式解释标记(如果没有用空格正确分隔标记)。Because of this behavior, the compiler may not interpret tokens as you intended if they are not properly separated by white space. 考虑下面的表达式:Consider the following expression:

i+++j  

在此示例中,编译器首先从三个加号生成可能最长的运算符 (++),然后将剩余的加号视为加法运算符 (+)。In this example, the compiler first makes the longest possible operator (++) from the three plus signs, then processes the remaining plus sign as an addition operator (+). 因此,该表达式将解释为 (i++) + (j) 而不是 (i) + (++j)Thus, the expression is interpreted as (i++) + (j), not (i) + (++j). 在此情况以及类似的情况下,使用空格和括号以避免多义性,并确保适当的表达式计算。In this and similar cases, use white space and parentheses to avoid ambiguity and ensure proper expression evaluation.

Microsoft 专用Microsoft Specific

C 编译器将 CTRL+Z 字符视为文件尾指示符。The C compiler treats a CTRL+Z character as an end-of-file indicator. 它忽略 CTRL+Z 后的所有文本。It ignores any text after CTRL+Z.

结束 Microsoft 专用END Microsoft Specific

另请参阅See Also

C 标记C Tokens