use of term "PASCAL" in C/C++ code?

Hi -

I'm reading an online tutorial on using TCP/IP at this site:

http://www.codeproject.com/Articles/13071/Programming-Windows-TCP-Sockets-in-C-for-the-Begin

It's pretty well written for the most part, but the author uses the term "PASCAL" often in his definitions without explanation. Anyone have an idea what this is?

Thanks.
If I recall correctly, PASCAL is just a #define of the __stdcall calling convention.
"PASCAL", as used in that tutorial, was the calling convention used in Win16 API, which is carried over in some of the Windows include files into today, #define'd as __stdcall

Here's a good summary of calling conventions, by Raymond Chen

http://blogs.msdn.com/b/oldnewthing/archive/2004/01/02/47184.aspx
http://blogs.msdn.com/b/oldnewthing/archive/2004/01/08/48616.aspx
Oh, so it's just some definition/enforcement of some argument-handling conventions?

It appears that if I just replace "PASCAL" with __stdcall wherever it appears in the tutorial, and basically ignore it after that, I'll probably be OK, right?
No, don't do that. If you have to use PASCAL, use PASCAL. Don't make assumptions on what it means.
Topic archived. No new replies allowed.