Hallo Fortranners,
I encountered different behaviour of FTN90 en FTN95. See Attached example.
Q: Is there a different interpretation in Fortran 90 vs. Fortran 95 ?
Or is it just a bug in my (old) version of FTN90 ?
Interpretation of FTN90 seems to be that
names R and F_I_PLUS_1 belong to scoping unit 'program Ctest'.
Thanks for your reactions.
! a.f90 1998-01-22
! Just a small test for FTN90 vs. FTN95
program Ctest
integer :: i
real :: x
x = f_i_plus_1()
print *
print *, " Output from this program:"
print *, x
contains
function f_i_plus_1() result ( R )
implicit NONE
i = i + 1
R = i
end function f_i_plus_1
end program ctest
[FTN90 Version 2.05 Copyright (c)SALFORD SOFTWARE LTD 1992-1994 & ]
[ (c)THE NUMERICAL ALGORITHMS GROUP 1991,1992,1993]
0014 *** Implicit type for R
0016 *** Implicit type for F_I_PLUS_1
*** Compilation failed
Licensed to: Mr J. van Oosterwijk
Organisation: TU DELFT
[FTN95/WIN32 Ver. 1.09 Copyright(c) Salford Software Ltd 1993-1997]
NO ERRORS [<F_I_PLUS_1> FTN95/WIN32 v1.09]
NO ERRORS [<CTEST> FTN95/WIN32 v1.09]
Creating executable: a.EXE
Output from this program:
4.210689E+06
---
Meilleures Salutations,
Best Greetings,
/---
Jan van Oosterwijk
Computing Centre
Delft University of Technology
Postbus 354
2600 AJ Delft
Netherlands / Pays Bas
Phone: +31 15 278 50 17
Fax: +31 15 278 37 87
|