Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 exptools 1/6/84; site ihnet.UUCP Path: utzoo!linus!vaxine!wjh12!genrad!decvax!harpo!ihnp4!ihnet!tjr From: tjr@ihnet.UUCP (Tom Roberts) Newsgroups: net.unix-wizards,net.lang.c Subject: extern/static in same file Message-ID: <120@ihnet.UUCP> Date: Tue, 3-Apr-84 11:13:24 EST Article-I.D.: ihnet.120 Posted: Tue Apr 3 11:13:24 1984 Date-Received: Wed, 4-Apr-84 08:00:43 EST Organization: AT&T Bell Labs, Naperville, IL Lines: 40 There has been a query about declaring a function extern, and then defining it static, in the same file. The specific question was "are there any C compilers that do not allow this?". YES! C/80 from the Software Toolworks (for the 8080/Z80 running CP/M) will not allow: main() { extern fun(); ... } static fun() { ... } This works: static fun(); main() { ... } static fun() { ... } [C/80 is a small, cheap ($50) C-compiler for a small system (CP/M). It is quite useful, in spite of its quirks] Tom Roberts ihnp4!ihnet!tjr