next up previous contents
Next: Section Comments Up: Comments Previous: Comments

Program Headers

It is sensible that a large program is divided up into self contained chunks ---or, at least, chunks with explicit references made to the other chunks necessary for the program to run.

The main program is then built out of the various chunks. In SICStus Prolog, the programmer has to use files to represent `program chunks'. Indeed, it is quite common for a large program to be described by a single file which loads all the necessary files in the right order.

Therefore, it is sensible to provide headers for each file as in:

 
% Program: 		pract2.pl

% Author: aidai

% Updated: 27 October 1988

% Purpose: 2nd AI2 Practical

% Uses: append/3 from utils.pl

% Defines:

% foo(+,-)

% baz(+,+) [-5pt]

This header has several advantages which need no elaboration.



Paul Brna
Mon May 24 20:14:48 BST 1999