Is it correct that in Fortran 9x free source form, an operator may not contain embedded blanks? The following code gives an example where FTN95 accepts such blanks:
winapp
program prog1
implicit none
Real :: a,b
a = 1.
b = 2.
! How must relational operators be written?
if ( b .gt. a ) write (*,*) 'a, b = ', a, b ! correct
if ( b . gt. a ) write (*,*) 'a, b = ', a, b ! correct?
if ( b .gt . a ) write (*,*) 'a, b = ', a, b
if ( a . gt. 0.1 . and . b .gt . 0.1) write (*,*) 'a, b = ', a, b
end program prog1
I am not sure whether for instance “.GT.” should be considered as one “token” or whether the token is only “GT”. What exactly does the standard say?
From a previous thread I learned that such details may be considered as pedantic (ASparge). They are NOT. Just imagine that a large system of programs is released to customers who use different compilers. This is our situation. We have always recommended to our customers FTN77, later FTN95 but of course a user is completely free to use a compiler of his choice. Nevertheless, up to now, where we released the code in fixed source form, we have never heard of any portability problems. Many thanks to Salford and Silverfrost! However, this is not the case with FTN95 and the free source form. I am right now analyzing further problems.
A last remark: We all know about the situation of Fortran. The fastest way to ring the bells for Fortran 9x would be the development of compiler dialects including “specific” implementations. No manager would support the investment of –say- 20 or even more man-years into the development of a Fortran program if it cannot guaranteed that every user could use it. Only very minor adaptions would be acceptable.
- Lassmann