next up previous contents
Next: Names of subroutines Up: The FORTRAN-77 programming Previous: Machine-dependence

Exceptions to the standard

  In one situation it is allowed to deviate from the FORTRAN standard. It concerns the passing of arrays to underlying subroutines. On one hand it is allowed that the number and size of the dimensions of an actual array are different from the number and size of the associated dummy argument declarator, on the other hand it is allowed to pass arrays through their starting address. In both situations we utilize explicitly the FORTRAN property that passing an array is effectively the passing of the starting address.
The use of this possibility is of course against any rule with respect to "clean" programming and should be avoided as much as possible. However in any large FORTRAN computing package it is common practice to use this option. Reasons for this exception are for example:

It will be clear that this approach is very dangerous. For that reason it is only allowed to use in the highest level of subroutines. All underlying subroutines must be "clean". Another consequence of this approach is that array bounds must be checked carefully, since checkers nor debuggers are able to perform their task in a correct way.
An extra aspect is important if integers and double precisions are stored in the same integer buffer array. Since doubles take two times the number of positions as integers, it is necessary that each double starts at an odd position in the array. If this is not the case, a double may be placed in two memory segments at a time and unwanted, incomprehensible messages may be the result.


next up previous contents
Next: Names of subroutines Up: The FORTRAN-77 programming Previous: Machine-dependence



ISNaS ontwikkeling
Wed May 24 08:37:14 METDST 1995