Prototype

This is a discussion on Prototype within the C Programming forums, part of the General Programming Boards category; struct hostent FAR *gethostbyname(const char FAR *name); hihi, I am new to winsock programming. what does FAR means ?...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,671
    #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, 04:27 PM
  3. prototype poblem
    By bazzano in forum C Programming
    Replies: 3
    Last Post: 10-30-2005, 09: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, 11:20 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21