Page 3 of 3 First 123
  • Jump to page:
    #31
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2007
    Posts
    921
    Rep Power
    537
    Schildt is rather notorious for being an author who writes incorrect material in an understandable manner. He is actually, however, somewhat correct in this case.

    Freestanding environments are, by their nature, typically written to support applications on a specific machine type (eg specific hardware, specific operating system, etc). If one cares at all about portability, a freestanding environment will not be targeted.

    Technically, some compilers that target windows development may be viewed as a hybrid of hosted and freestanding implementations (usually with compiler settings to choose which mode it operates in). For example, compilers targeting development of windows applications support winmain(), do things using the dedicated win32 API, etc are formally freestanding environments. Flick an IDE or compiler setting, however, and the compiler supports console applications(with main(), etc) so targets a hosted environment.

    The requirement, with respect to main(), is that a hosted environment will support either of two forms of main() returning int as the first function called for the application. That does not prevent an implementation from supporting other entry points (eg some environments support void main() as well) but such extensions will not be used by developers who care about portability.
  2. #32
  3. Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Jun 2005
    Posts
    5,964
    Rep Power
    4852
    Let me add somewhat to that. Perhaps 90% of all computer systems delivered today do not run in an environment that the average programmer considers typical (Windows and various Unix clones).

    The "typical" keyboard, and the "typical" display are nowhere to be found. Languages like C and C++ came to fruition before these atypical "typical" systems evolved. They chose (wisely, I think) to ignore implementation specific approaches, other than by accomodating them through proprietary run-time libraries. This makes some stuff (like clearing keyboard buffers, which might not even exist) tough to implement. Dealing with those problems requires an intimate knowledge of the underlying system. Such solutions are NOT portable.

    Portability in the real world is a chimera. It is somewhat like the ideal spouse -- something to be sought after, but rarely gained.
    Write no code whose complexity leaves you wondering what the hell you did.
    Politically Incorrect DaWei on Pointers Grumpy on Exceptions
  4. #33
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2009
    Location
    Georgia, USA
    Posts
    13
    Rep Power
    0
    In 0.1, please add Code::Blocks, it's my favorite IDE/compiler
    Oh, and please, in the part for conversion to hex/octal, please add a description for how to do it with iomanip.
    Edit: I posted this for other people's good, not my own, since I already know how to do this.

    Comments on this post

    • jwdonahue disagrees : You should have started your own thread for these requests instead of poluting this one.
Page 3 of 3 First 123
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo