Path: utzoo!mnetor!uunet!husc6!mailrus!umix!umich!mibte!gamma!ulysses!andante!alice!ark From: ark@alice.UUCP Newsgroups: comp.lang.c Subject: Re: Prototypes Message-ID: <7752@alice.UUCP> Date: 19 Mar 88 16:13:04 GMT References: <2550049@hpisod2.HP.COM> <7412@brl-smoke.ARPA> <3351@chinet.UUCP> <25699@cca.CCA.COM> Organization: AT&T Bell Laboratories, Liberty Corner NJ Lines: 22 Here is one sensible way to deal with prototypes: Suppose you are writing a function to be used by others. Let's call it foo(). Declare it in foo.h: extern double foo (int, char *, long); When you write foo.c, be sure to include foo.h: #include "foo.h" double foo (int n, char *p, long size) { /* stuff */ } Indeed, you have stated foo's signature twice. However, the compiler should reject an attempt to compile foo.c if the two instances do not match. Now a user who includes foo.h will automatically get the right declaration.