Assumed-Shape Arrays

In many cases, passing the whole extent of an array to a function/subroutine is too tedious (e.g., you have ten arrays with different extents). Sometimes, you don't even know their extents. To overcome this, Fortran 90 offers the so-called assumed-shape arrays. Of course, they must be formal arguments.

Syntax

To declare an assumed-shape array, follow all rules discussed in previous pages, except its extent. An assumed-shape array has an extent like the following:
lower-bound :
            :

Examples

Let us redo the examples in the previous page:

Additional Notes