Home Segments Index Top Previous Next

Chapter 42:

How To Arrange Functions
in a Multiple-File Program

In general, programs with complex program elements are hard to write, hard to debug, hard to improve, and hard to maintain. Accordingly, when a function definition of any kind becomes too complex to understand, you should think about breaking it up into subfunctions that you can debug and maintain independently.

Also, you should generally divide your large programs into logically separable modules, each of which occupies its own, separately compiled file. In this chapter, you learn how to construct multiple-file programs.