www.digitalmars.com [Home] [Search] [D]

Portability Guide

It's good software engineering practice to minimize gratuitous portability problems in the code. Techniques to minimize potential portability problems are:

OS Specific Code

System specific code is handled by isolating the differences into separate modules. At compile time, the correct system specific module is imported.

Minor differences can be handled by constant defined in a system specific import, and then using that constant in an if statement.


Copyright (c) 1999-2001 by Digital Mars, All Rights Reserved