(K&R) At least the first 31 characters of an internal name are significant?

后端 未结 5 972
独厮守ぢ
独厮守ぢ 2020-12-14 20:18

When taken literally, it makes sense, but what exactly does it mean to be a significant character of a variable name?

I\'m a beginning learner of C using K&R. He

5条回答
  •  星月不相逢
    2020-12-14 20:51

    It means what you fear it means. For external names, the C standard at the time K&R 2nd ed. was written really does give only six case-insensitive characters! So you can't have afoobar and aFooBaz as independent entities.

    This absurd limitation (which was to accommodate legacy linkers now long-gone) is no longer relevant to any environment much. The C99 standard offers 31 case-sensitive characters for external names and 63 internally, and commonly-used linkers in practice support much longer names.

提交回复
热议问题