delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/13/11:46:19

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: Thu, 13 Aug 1998 15:41:11 GMT
Organization: EUnet Austria
Lines: 31
Message-ID: <35d30896.834512@news.Austria.EU.net>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980812131004 DOT 17366A-100000 AT is> <35D2A017 DOT 4808178C AT geocities DOT com>
NNTP-Posting-Host: e031.dynamic.vienna.at.eu.net
Mime-Version: 1.0
NNTP-Posting-Date: 13 Aug 1998 15:42:19 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Destination: Merlin <merlin__ AT geocities DOT com>
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.
--
Bye,
   Gerhard

email: sparhawk AT eunet DOT at
       g DOT gruber AT sis DOT co DOT at

Spelling corrections are appreciated.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019