gpt4 book ai didi

c - 最大标识符长度

转载 作者:太空狗 更新时间:2023-10-29 16:45:41 26 4
gpt4 key购买 nike

我在哪里可以找到 C 中的最大标识符长度是多少?

在哪个头文件中指定了该限制?

最佳答案

没有包含标识符长度限制的头文件;就算有,又能帮到你什么?无论如何,您不能根据头文件中的值在编译时更改标识符长度。

C standard ,第 5.2.4.1 节说:

  • 63 significant initial characters in an internal identifier or a macro name (each universal character name or extended source character is considered a single character)
  • 31 significant initial characters in an external identifier (each universal character name specifying a short identifier of 0000FFFF or less is considered 6 characters, each universal character name specifying a short identifier of 00010000 or more is considered 10 characters, and each extended source character is considered the same number of characters as the corresponding universal character name, if any)

它还包含一个脚注:

Implementations should avoid imposing fixed translation limits whenever possible.

所以你应该检查你的文档,看看你的编译器是否支持标识符中更多的有效字符。

关于c - 最大标识符长度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2352209/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com