Archived

This topic is now archived and is closed to further replies.

PASCAL convention?

This topic is 5853 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i heard that using the PASCAL calling convention on functions with a finite amount of parameters( like int add(x,y); not int dosomething(x,...)) makes your executables smaller. any pointers on using this?

Share this post


Link to post
Share on other sites
PASCAL in the Win32 environment means __stdcall which is slightly more efficent in the way it passes parameters. Most of the time it really doesn''t matter - and when it does you generally don''t have a choice of which calling convention to use. You have to use the correct one or it doesn''t work.

IIRC, you''re supposed to use __stdcall for dll functions. And nearly all of the Win32 functions and callbacks are __stdcall''s.

There''s a project setting to make __stdcall the default convention if you want to try it.

Magmai Kai Holmlor

"Oh, like you''ve never written buggy code" - Lee

"What I see is a system that _could do anything - but currently does nothing !" - Anonymous CEO

Share this post


Link to post
Share on other sites