|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#31
|
|||
|
|||
|
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. |
|
#32
|
||||
|
||||
|
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.
__________________
C/C++ pointers (Original in the "Commonly Asked Questions" thread). |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > Commonly Asked C/C++ Questions |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|