Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C 6.0 - <b>_far _far -- non-standard type modifier</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _far                    _far -- Non-Standard Type Modifier

    A far data item (or function) may be located anywhere in memory and
    is not assumed to reside in the current data (or code) segment.  Its
    address is 32 bits long.

      Notes:    You cannot pass a far pointer, or the address of a far
                object, to most small-model library routines. You can,
                however, pass the values of far objects to such routines.

                Depending on the memory model specified at compile-time,
                sizeof(char far *) may or may not be the same as
                sizeof(char *).

                Variables declared with class auto are always near since
                they reside on the run-time stack. If you specify auto
                and far, far will be ignored.  However, you may have a
                far pointer auto object. Therefore, far is only useful
                with static or extern objects, or function return values.

                The default memory model is defined by the compile-time
                switch /A.

   -------------------------------- Example ---------------------------------

           int _far value;
           double _far table[100];
           char _far *fpc;
           char _far **fppc;
           char _far * _far *fpfpc;
           long int _far * _far check(char _far, int, int _far);
           int (_far *funptr)();

           i = sizeof(char _far *);




See Also: _near _huge Switches auto static extern

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson