Program documentation



next up previous contents
Next: COMMON documentation Up: ALEPH Programmers hints Previous: Bank documentation

Program documentation

In every subroutine there must be a one line comment giving a short description This line has to start with 'C!'. In the subroutine header the author name and the date of writing and of modifications shall be given. The author name shall be given in full and not only the initials. All arguments used in the calling sequence shall be described. A longer comment (minispec) explaining the function of the subroutine shall be given. Minispecs are indicated by 'C?' at the start of line. Routines called and calling or BOS-banks booked need not be given in the SUBROUTINE header. This information will be extracted automatically from the code.

Example

*DK EXAMPLE
      SUBROUTINE EXAMPL(INVAR,RIN,RARR,OUT,FLG)
C
C----------------------------------------------------------------------
C!   - This is an example for a subroutine header
C!
C!    Author      :- J. Knobloch 86/9/3
C!    Modified    :- J. Knobloch 86/9/12
C!
C!   Input:
C!        - INVAR /I     : The first one
C!        - RIN   /R     : This is a real input variable
C!        - RARR  /R     : Some input array dimensioned by calling routine
C!
C!   Output:
C!        - OUT   /R     : Even a dummy routine creates output
C!        - IFLG  /I     : Flag to indicate errors
C!                   = 0   if all O.K.
C!                   = 1   if INVAR out of range
C!
C!
C!   Libraries required: none
C!
C!    Description
C!    ===========
C!    This is a routine serving as an example how to write a
C!    subroutine header. The type indications for the arguments are
C!    not necessary if standard is used.
C?
C?     read a hypothetical bank from the raw data tape
C?     if the bank HYPO does not exist
C?                print a warning message
C?                set an error flag
C?                return from subroutine
C?     else
C?                create another bank XBNK
C?                apply global calibration constant
C?                transform ....
C?                .....
C!======================================================================
*IF .NOT.DOC



Eric Lancon
Thu Sep 29 15:07:07 MET 1994