From: sparhawk AT eunet DOT at (Gerhard Gruber) Newsgroups: comp.os.msdos.djgpp Subject: Re: A very basic question about C programming... diary of a newbie Part 1 Date: Sun, 16 Aug 1998 17:06:00 GMT Organization: EUnet Austria Lines: 32 Message-ID: <35d8a9fe.9175287@news.Austria.EU.net> References: <35D2A017 DOT 4808178C AT geocities DOT com> <35d30896 DOT 834512 AT news DOT Austria DOT EU DOT net> <35D3BC2B DOT 5F92B357 AT geocities DOT com> <35d3ef05 DOT 75223464 AT news DOT snafu DOT de> <35D664E8 DOT EB0CEA0C AT geocities DOT com> NNTP-Posting-Host: e035.dynamic.vienna.at.eu.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Date: 16 Aug 1998 17:07:17 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Content-Transfer-Encoding: 8bit Precedence: bulk Destination: Merlin From: Gruber Gerhard Group: comp.os.msdos.djgpp Date: Sun, 16 Aug 1998 04:52:58 GMT: >> Of course it's ok - if you are a superman and never make unintentional >> mistakes. The purpose of prototypes is to allow the compiler to do >> error checking. Why would you intentionally refuse to accept this help >> if it is for free ? > >well....i suppose it would be silly not to include that one word and risk a mistake >but...If you passed parameters to the function prototyped without the void...it >wouldn't screw up the program. It simply would ingnore the parameters wouldn't it?... >or would it? No it would not. In C++ the compiler should issue a warning (or an error?) and in C it is correctly passed on. If you are calling a function with pascal convention, though, it would crash because in pascal the called function is cleaning up the stack. -- Bye, Gerhard email: sparhawk AT eunet DOT at g DOT gruber AT sis DOT co DOT at Spelling corrections are appreciated.