[PATCH, Fortran] Parse FINAL procedure declarations

Tobias Burnus burnus@net-b.de
Fri May 23 21:37:00 GMT 2008


Daniel Kraft wrote:
>> a) You miss a check whether the finalization procedure is a 
>> subroutine. Currently also functions are accepted.
>
> Should there be any?  I thought it could be both (and for functions 
> the return would just be ignored or something like that).

Fortran is not C and makes a real distinction between functions and 
subroutines. It is not possible to call a function without 
assigning/using the return value somehow. Additionally, 4.5.5. 
explicitly states:

"The FINAL keyword specifies a list of final subroutines."

Note the word "subroutines" -- and not "procedures" which denotes both 
subroutines and functions.

Tobias



More information about the Fortran mailing list