Skip to main content
gamedev.net
🔒 Locked

long FAR PASCAL?

Started by __Daedalus__ Mar 5, 2003 at 11:04 AM 3 replies 1.5k views
Original Post
__Daedalus__
__Daedalus__
Can someone tell me why Jim uses "long FAR PASCAL" as a declaration for his windows message processor, in the book "Programming RPGs with DirectX", as opposed to ... I think: LRESULT CALLBACK WINAPI Is it just a legacy programming thing and Jim showing his age?
Sneftel
Sneftel
It''s the same thing. WINAPI CALLBACKs use the PASCAL calling convention. *shrug* it doesn''t matter either way.


But... but that''s what HITLER would say!!
pan narrans
pan narrans
Yes, according to my MSDN Library PASCAL is now obsolete, and the WINAPI macro, which translates to the appropriate calling convention for the target, is used instead.

I think it was just an oversight on Jim''s part. Someone correct me if I am wrong.


pan narrans | My Website | Study + Hard Work + Loud Profanity = Good Code
Minister of Propaganda : leighstringer.com : Nobody likes the man who brings bad news - Sophocles (496 BC - 406 BC), Antigone
Colin Jeanne
Colin Jeanne
quote:
Original post by Pipo DeClown
What does FAR mean?



It used to mean that the pointer was a far pointer (as opposed to a near pointer). Far pointers had a longer address than near pointers on 16 bit OSes (IIRC, far pointers were 32 bits while near pointers were 16 bits). These conventions are obsolete in Win32 and the windef.h defines NEAR and FAR now evaluate to empty strings (and thus are ignored).

500x4



Qui fut tout, et qui ne fut rien
Invader''s Realm

Topic Locked

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

Sign in to reply to this topic.