- 论坛徽章:
- 0
|
附:1975年版的C Reference Manual里就可以看到早期C的没有对于对象而言正交的存储期和链接的概念,存储类直接用于标识符(这里的标识符显然只能解释为对象/函数的):
4. What’s in a Name?
C bases the interpretation of an identifier upon two attributes of the identifier: its storage class and its type. The
storage class determines the location and lifetime of the storage associated with an identifier; the type determines the
meaning of the values found in the identifier’s storage.
There are four declarable storage classes: automatic, static, external, and register. Automatic variables are local to
each invocation of a function, and are discarded on return; static variables are local to a function, but retain their values
independently of invocations of the function; external variables are independent of any function. Register variables
are stored in the fast registers of the machine; like automatic variables they are local to each function and disappear
on return.
|
|