Xref: utzoo comp.lang.c++:7840 comp.lang.c:29227 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!usc!samsung!munnari.oz.au!bruce!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.c++,comp.lang.c Subject: Re: Type Qualifier [volatile] Message-ID: <3115@goanna.cs.rmit.oz.au> Date: 31 May 90 04:24:39 GMT References: <4275@infmx.UUCP> <1990May22.124936.5727@aucs.uucp> <54963@microsoft.UUCP> Followup-To: comp.lang.c Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 23 In article <4275@infmx.UUCP> briand@infmx.UUCP (brian donat) writes: > When would a programmer want to explicitly use the 'auto' storage class? In article <54963@microsoft.UUCP>, mikero@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."