< Back
Page 7 of 7
Like this article? We recommend
Think Portably
Think Portably
The easiest way to write portable code is not to use C. If portable code is your most important design goal, choose a language that provides a much more abstract model of a computer and shields you from all of the details of the architecture.
If this is impossible, try to think about portability from the start. Identify potentially nonportable code and make sure that it's factored out into separate functionsand ideally separate filesso that you can easily replace it with a target-specific implementation.
< Back
Page 7 of 7