Program Structure
Most CONTROL programs are divided into:
* a controlling or driving part that contains the 'main' function
* the application routines and parameters
* 'included' functions and parameters that are not sufficiently generic to be included in the library.
* Creative Computing library routines.
* standard operating system specific platform library routines.
'Main' program stubs
* aad.c Add/Alter/Delete indexed master file records
* adl.c Alter/Delete/List non-indexed files.
* cont.c alter/list CONTROL records
* cyc.c end of period roll over (CYClic processing)
* eat.c ENter Transactions
* enq.c Enquiry programs
* ent.c ENTer transactions
* rep.c for REPorts
* lstr.c LiSt Transactions
* post.c POST transactions (move from current days transactions to transaction history.
To produce an application program, the linker is used to combine the object file produced by the program with the appropriate main object file. Any routines not declared in either the main program or the application are searched for in the Creative Computing library cclib.a and then the standard platform libraries.
The 'main' routine will open all index and data files detailed in the application, allocate memory for record buffers and then work the base application logic by calling standard functions that are defined in the application specific code that was linked with the main module.