4.2 Calling as a Subroutine

There are two ways to call BESTPRED as a subroutine: though the bestpred_fmt4 subroutine, which prepares Format 4 data by applying age adjustments etc., and by calling the bestpred subroutine directly. Regardless of which routine you call you must either call read_parms in the outer routine (in order to insure that the parameter file is read) or explicitly provide values for subroutine arguments that are usually read from the parameter file. The former is preferred to the latter.

If you are calling BESTPRED from a C-language program note that C and Fortran treat multiple-dimensional arrays differently: Fortran 90 varies the leftmost index the fastest, while C varies the rightmost index the fastest (column-major versus row-major ordering). An array that is 2-by-4 in Fortran will be 4-by-2 in C, that is, the C array will be the transpose of the Fortran array.

See About this document... for information on suggesting changes.