One (or two) more for Guy's portability rules

Martin Minow minow at decvax.UUCP
Sun Nov 17 00:20:36 AEST 1985


Here are a few more guidelines (from experience -- most of my stuff has to
run on two different architectures).

22. Actually port your code to at least two different architectures,
    operating systems, and compilers.

23. Run your code through lint wherever possible.

24. Develop a consistant method of conditionally compiling machine,
    system, and compiler-dependent segments.  Use #if, rather than
    #ifdef to protect yourself against typo's (assuming your preprocessor
    warns you of undefined symbols in #if's).

25. Distribute a fairly large, useful, tool through mod.sources: you
    will soon discover that you weren't paranoid enough.

26. Run your code through lint.  (Oh, for a public-domain lint!)

Martin Minow
decvax!minow



More information about the Comp.lang.c mailing list