Skip to main content
gamedev.net
🔒 Locked

PASCAL convention?

Started by barazor Dec 8, 2001 at 5:02 PM 0 replies 300+ views
Original Post
barazor
barazor
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?
Shannon Barber
Shannon Barber
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
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.