Type Qualifier [volatile]
Richard A. O'Keefe
ok at goanna.cs.rmit.oz.au
Thu May 31 14:24:39 AEST 1990
In article <4275 at infmx.UUCP> briand at infmx.UUCP (brian donat) writes:
> When would a programmer want to explicitly use the 'auto' storage class?
In article <54963 at microsoft.UUCP>, mikero at microsoft.UUCP (Michael ROBIN) writes:
> Gee, don't you guys know anything? You use "auto" to line up your declarations:
I have been waiting for the people who were _there_ to answer, but so far
no-one has. The answer is HISTORY. C had 'storage' qualifiers BEFORE it
had types. (Take a look at 'bc' some time.) (At that time, it did not
have nested blocks.) So you would write
foo(a) /* a is an int, foo returns int */
{
static b; /* b is a static int */
auto c; /* c is an "automatic" int */
...
}
In fact you can still write your programs that way if you really want to.
C is descended from B which is derived from BCPL, in which there was one
type, "machine word" (which also served as pointer and float).
--
"A 7th class of programs, correct in every way, is believed to exist by a
few computer scientists. However, no example could be found to include here."
More information about the Comp.lang.c
mailing list