Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn ) Newsgroups: net.lang.c Subject: Re: typedef's & cc Message-ID: <5729@brl-tgr.ARPA> Date: Mon, 12-Nov-84 09:35:57 EST Article-I.D.: brl-tgr.5729 Posted: Mon Nov 12 09:35:57 1984 Date-Received: Tue, 13-Nov-84 01:32:15 EST References: <145@harvard.ARPA> Distribution: net Organization: Ballistic Research Lab Lines: 14 > typedef int foo; > > main() > { > auto int foo; > > foo = 2; > } > > Stylistic considerations aside, why isn't foo a variable inside main, > and a type outside? Typedefs are not scoped. They define synonyms for (possibly complicated) data types. After "typedef int foo;", "foo" is just like "int".