far void()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • khaleel.alyasini@gmail.com

    #1

    far void()

    hi, i would like to know if i want to use something like this ..


    far void functionA()
    {
    process;
    }

    but the problem is .. C++ or should i say VC++ doesnt recognize the
    'far' function. does anyone know what header file should be included?

  • Rolf Magnus

    #2
    Re: far void()

    khaleel.alyasin i@gmail.com wrote:
    [color=blue]
    > hi, i would like to know if i want to use something like this ..
    >
    >
    > far void functionA()
    > {
    > process;
    > }
    >
    > but the problem is .. C++ or should i say VC++ doesnt recognize the
    > 'far' function. does anyone know what header file should be included?[/color]

    There is no such thing as "far" in standard C++. Some implementations might
    have something like that, but you would need to ask in a newsgroup about
    VC++ to find out if that one has it (and how or why to use it).
    comp.lang.c++ only deals with standard C++.

    Comment

    • Moonlit

      #3
      Re: far void()

      Hi,

      In windows apps there is no need to use far. In the 'far' past we used to
      use far to distinquish pointers and calls in between segments i.e. normally
      you could only address 64kB The part in memory was determined by the value
      in DS, CS etc.(the segment registers). However luckily those days are gone.
      The memroy is now 'flat' meaning there is no tiny, small medium far and huge
      pointers etc. There is just 32 bits windows (until 64 becomes common).

      --


      Regards, Ron AF Greve



      <khaleel.alyasi ni@gmail.com> wrote in message
      news:1143194869 .463111.218290@ z34g2000cwc.goo glegroups.com.. .[color=blue]
      > hi, i would like to know if i want to use something like this ..
      >
      >
      > far void functionA()
      > {
      > process;
      > }
      >
      > but the problem is .. C++ or should i say VC++ doesnt recognize the
      > 'far' function. does anyone know what header file should be included?
      >[/color]


      Comment

      • osmium

        #4
        Re: far void()

        <khaleel.alyasi ni@gmail.com> wrote:
        [color=blue]
        > hi, i would like to know if i want to use something like this ..
        >
        >
        > far void functionA()
        > {
        > process;
        > }
        >
        > but the problem is .. C++ or should i say VC++ doesnt recognize the
        > 'far' function. does anyone know what header file should be included?[/color]

        far is not a function, it is probably a macro, it goes back to the days of
        DOS when RAM was in 64KB chunks, called segments. The modern way to write
        the function above is simply to drop the "far" so it becomes:

        void functionA() { }.

        If you are trying to use an old library you probably should try to find an
        old compiler to go with the old library. Borland offers such a compiler
        for free and perhaps Microsoft does too.


        Comment

        • Default User

          #5
          Re: far void()

          osmium wrote:
          [color=blue]
          > <khaleel.alyasi ni@gmail.com> wrote:
          >[color=green]
          > > hi, i would like to know if i want to use something like this ..
          > >
          > >
          > > far void functionA()
          > > {
          > > process;
          > > }
          > >
          > > but the problem is .. C++ or should i say VC++ doesnt recognize the
          > > 'far' function. does anyone know what header file should be
          > > included?[/color]
          >
          > far is not a function, it is probably a macro, it goes back to the
          > days of DOS when RAM was in 64KB chunks, called segments. The modern
          > way to write the function above is simply to drop the "far" so it
          > becomes:[/color]

          Good old Turbo C and C++ for DOS. I remember well.

          [color=blue]
          > void functionA() { }.
          >
          > If you are trying to use an old library you probably should try to
          > find an old compiler to go with the old library. Borland offers
          > such a compiler for free and perhaps Microsoft does too.[/color]

          If there are a lot, then a new macro can be created, but it's really
          better to weed them out if possible. The bigger problem is that code
          using them is likely outdated in many other ways, and probably should
          be extensively rewritten anyway.



          Brian

          Comment

          Working...