DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Using programming tools

Program structure and guidelines

As illustrated through testcase, specification of applications must define the actual work to be accomplished. There are many issues that should be considered in designing applications written in C, including:


modularity
Good C programming style suggests that large applications be coded in several small component parts. Several C codes can be linked together to form one executable file; use the make(CP) utility to simplify the process.

functions
Functions that could run parallel to each other should be coded in separate executable files. This is especially useful if you ever port the application to a multiprocessor distributed system.

archives
If your application uses certain routines frequently in different programs, it is advisable to create an archive library or shared library for those routines. Shared libraries usually reduce the amount of disk space and memory occupied by the executable modules and enable you to update all programs that call a certain routine without recompiling those programs. There are limits to the number of shared libraries that any executable program can access. For more information, see ``Shared libraries''.


Next topic: Program structure
Previous topic: Testing the correction

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003