< previous page page_5 next page >

Page 5
1.4.2
Structure of Source Code Routines
The source code for every routine in this system has the same overall format. Each begins with an extended comment section, which provides basic documentation and itself is organized in a standard way.
This section is followed by any necessary #include statements, then by the source code itself.
The documentation section is organized in the following way:
1.4.2.1
Identification
The documentation section opens with the identification of the routine by its filename on line one. This section is followed by a short body of text, which summarizes the general function of the routine.
1.4.2.2
Inputs
Following the identification section is a list of all inputs to the routine. These are listed in the order of their occurrence in the argument list. Each is identified by type. The function of each input for the routine is briefly explained. Valid ranges are discussed where relevant.
1.4.2.3
Outputs
The next section discusses the output of routines that return a single output as the value of the function. In the event that the routine returns more than one output, the variables are pointer variables, which are listed in the order of their occurrence in the argument list. Each is identified by type. The role of each output for the routine is briefly explained. Valid ranges are discussed where relevant.
1.4.2.4
Notes
A section of notes follows, which adds any important limitations, qualifying conditions regarding usage, or annotations concerning the algorithm. This section should always be read carefully.
1.4.2.5
Function Code
Finally, the function code itself appears. All function and variable types are declared, even when this is not required. The following short routine is an example of the general structure of SCDTL routines. This routine is not part of the SCDTL system, but is entirely functional, and could be used in an obstetrical application.

 
< previous page page_5 next page >