Mail Archives: djgpp/1998/08/14/16:45:40
Destination: Merlin <merlin__ AT geocities DOT com>
From: Gruber Gerhard
Group: comp.os.msdos.djgpp
Date: Fri, 14 Aug 1998 04:28:23 GMT:
>> 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...
Leaving the brackets empty doesn't say that this function take sno arguments,
it says only that there is a function. No info about any arguments. The
arguments may be 0, 1, 2, ..., but only if you say function(void) then it says
that the function takes exactly ZERO arguments.
--
Bye,
Gerhard
email: sparhawk AT eunet DOT at
g DOT gruber AT sis DOT co DOT at
Spelling corrections are appreciated.
- Raw text -