Thread: FAR Pointer

  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    10

    FAR Pointer

    what is a far pointer ?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    An indication that the compiler and/or reference material you're reading are WAY too old.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Back in the Old Days, the x86 DOS memory was set up in pages. You had a local page, and you had the non-local or FAR memory pages, pointers to which could be given with the FAR keyword, in Turbo C/C++.

    Thankfully nowadays, the memory is a flat memory model, so the FAR descriptor is no longer needed, on a modern compiler.

    IMO if you program code calls for a FAR memory pointer, you can simply ignore it, but do consider seriously upgrading your compiler if it uses the FAR keyword.

  4. #4
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    NEAR and FAR are from WIN16 and obsolete in WIN32 or WIN64.

    Both are defined in WINDEF.H as blank strings.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Following CTools
    By EstateMatt in forum C Programming
    Replies: 5
    Last Post: 06-26-2008, 10:10 AM
  2. Quick Pointer Question
    By gwarf420 in forum C Programming
    Replies: 15
    Last Post: 06-01-2008, 03:47 PM
  3. Parameter passing with pointer to pointer
    By notsure in forum C++ Programming
    Replies: 15
    Last Post: 08-12-2006, 07:12 AM
  4. Direct3D problem
    By cboard_member in forum Game Programming
    Replies: 10
    Last Post: 04-09-2006, 03:36 AM
  5. Struct *** initialization
    By Saravanan in forum C Programming
    Replies: 20
    Last Post: 10-09-2003, 12:04 PM