Thread: Prototype

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    85

    Prototype

    struct hostent FAR *gethostbyname(const char FAR *name);

    hihi, I am new to winsock programming.
    what does FAR means ?

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    'far' means 'please remove me, I'm obsolete', or 'if I'm not obsolete, then you need a new compiler, because your compiler is obsolete'.

    'far' is for far pointers. Basicly it's so you can make nice little memory allocations and the like with malloc and what not to little blocks of memory far far away.

    In other words: With the advent of 32bit compilers, this is obsolete. It is used on 16bit compilers to address more memory.

    Something like that. That's a decent explanation of it. Otherwise you're limited to only 64K of memory.

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    #define FAR /* remove redundant keyword */

    Is a nice easy way of getting rid of it if you don't need it

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 13
    Last Post: 08-24-2006, 12:22 AM
  2. Function prototype questions
    By Kayoss in forum C++ Programming
    Replies: 6
    Last Post: 11-30-2005, 05:27 PM
  3. prototype poblem
    By bazzano in forum C Programming
    Replies: 3
    Last Post: 10-30-2005, 10:01 AM
  4. Prototype syntax for sub-class constructor
    By starkhorn in forum C++ Programming
    Replies: 1
    Last Post: 10-08-2004, 07:33 AM
  5. call to function without prototype
    By lgbeeb in forum C Programming
    Replies: 2
    Last Post: 03-25-2003, 12:20 PM