Mail Archives: djgpp/1998/08/18/10:00:46
Destination: Merlin <merlin__ AT geocities DOT com>
From: Gruber Gerhard
Group: comp.os.msdos.djgpp
Date: Tue, 18 Aug 1998 08:08:56 GMT:
>> I don't know if DJGPP supports pascal style calling, but in C the arguments
>> are pushed on the stack and taken from the stack by the caller. In pascal the
>> arguments are pushed on the stack by the caller and removed from the stack by
>> the callee. This means that, if you pass the wrong number of parameters (to
>> much) to a C function, then nothing happens (if you pass to less then you
>> might get problems). If you pass to much arguments to a pascal function then
>> the stack is damaged. This is only of interest if you have to interface to
>> pascal functions (i.e in windows programming this is needed).
>
>ahhh...so in the end all this could cause a stack overflow..that is assuming it doesn't stop
>when you screw the stack up...
Yes. That's why it never hurts to use and obey the prototypes. :)
--
Bye,
Gerhard
email: sparhawk AT eunet DOT at
g DOT gruber AT sis DOT co DOT at
Spelling corrections are appreciated.
- Raw text -