Page:4SIGHT manual- a computer program for modelling degradation of underground low level waste concrete vaults (IA 4sightmanualcomp5612snyd).pdf/89

2. MAIN 2. MAIN.

The body of 4SIGHT is fairly straightforward and the logical flow can be inferred from the outline below.

⟨Include files 3⟩; ⟨Preprocessor definitions 11⟩; ⟨User defined data types 14⟩; ⟨Global variables 4⟩; ⟨Function declarations 23⟩; ⟨Interrupt handlers 24⟩; ⟨Input parsing routine 13⟩; int main(int arge, char **argv) {   int i, j, k;    ⟨System setup 5⟩; ⟨Parse input 6⟩; ⟨Parameter initialization 7⟩; ⟨Print header 75⟩; ⟨Print intermediate results 76⟩; do { if (kbhit) { i = getch; control_break; }     ⟨Ion transport 8⟩; ⟨Adjust parameters 9⟩; ⟨Print intermediate results 76⟩; ⟨Assess termination 10⟩; } while (!termination); ⟨Print termination information 77⟩; ⟨Print desired output 78⟩; return 1; }
 * 1) define banner "\"\tThis is 4SIGHT (Version 1.0)\"\n\n"
 * 2) define NUM_CELLS 20
 * 3) define NUM_SURFACES (NUM_CELLS + 1)
 * 4) define DLIMIT 0.0005

3. The following are #include files needed for some of the intrinsic functions such as printf and scanf. The math functions pow and log and the math error routine matherr require math.h. Additional include files are declared when needed. The routine kbhit requires the header file conio.h.

⟨Include files 3⟩ $$\equiv$$
 * 1) include 
 * 2) include 
 * 3) include 
 * 4) include 
 * 5) include 

See also sections 22, 28, and 32.

This code is used in section 2.