Mail Archives: djgpp/1998/08/17/04:30:50
Gerhard Gruber wrote:
> Destination: Merlin <merlin__ AT geocities DOT com>
> 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.
ahh..so if i left out the void and passed a parameter could i use that parameter without
without having ever prototyped it? and what do you mean by pascal convention?
l8r,
Merlin.
- Raw text -