Message-ID: <35D3BC2B.5F92B357@geocities.com> From: Merlin MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: A very basic question about C programming... diary of a newbie Part 1 References: <35D2A017 DOT 4808178C AT geocities DOT com> <35d30896 DOT 834512 AT news DOT Austria DOT EU DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 33 Date: Fri, 14 Aug 1998 04:28:23 GMT NNTP-Posting-Host: 228-cy-wpg.ilos.net NNTP-Posting-Date: Thu, 13 Aug 1998 23:28:23 CDT Organization: MBnet Networking Inc. To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Gerhard Gruber wrote: > Destination: Merlin > From: Gruber Gerhard > Group: comp.os.msdos.djgpp > Date: Thu, 13 Aug 1998 08:16:15 GMT: > > >> No, this isn't a prototype. This is: > >> > >> void do_nothing(void); > > > > if you leave the void in brackets out it will be assumed.. > > That's wrong. > > The function(void) means that you specifically say that these function takes > no arguments. a call like this function(i) yields an error. If you leave the > void out then this means you don't give the compiler a hint what this function > takes. writing function() or function(i) or function(a, b, c, d, e) is > considered valid in this case, so leaving the void out is not the default vor > void. It is totaly different. wow...i didn't know this...i was told it was assumed... but i still suppose that leaving void out would be ok... I mean it would be silly to pass parameters to a function that didn't require any. So in effect it would turn out pretty much the same whether or not you specify void in the brackets or not... l8r, Merlin.