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: Tue, 18 Aug 1998 13:57:18 GMT Organization: EUnet Austria Lines: 35 Message-ID: <35db6f43.748335@news.Austria.EU.net> References: <35D2A017 DOT 4808178C AT geocities DOT com> <35d30896 DOT 834512 AT news DOT Austria DOT EU DOT net> <35D3BC2B DOT 5F92B357 AT geocities DOT com> <35d3ef05 DOT 75223464 AT news DOT snafu DOT de> <35D664E8 DOT EB0CEA0C AT geocities DOT com> <35d8a9fe DOT 9175287 AT news DOT Austria DOT EU DOT net> <35D7CDA3 DOT 2138B40B AT geocities DOT com> <35d92222 DOT 866292 AT news DOT Austria DOT EU DOT net> <35D935FA DOT BB5E1E88 AT geocities DOT com> NNTP-Posting-Host: e235.dynamic.vienna.at.eu.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Date: 18 Aug 1998 13:58:38 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Content-Transfer-Encoding: 8bit Precedence: bulk Destination: Merlin 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.