This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH,gfortran] Error or warning about nonstandard type declarations


Steve Kargl wrote:
On Fri, Dec 16, 2005 at 05:46:04AM +0100, Paul Thomas wrote:
That all looks fine to me, apart from one issue - what was the F77 preferred form for non default kinds? I thought that it was the * form?

Nope. Fortran 77 had REAL, DOUBLE PRECISION, and COMPLEX. There was no DOUBLE COMPLEX nor the * forms. I don't have my copy of F77 in front of me, so I can't say what the INTEGER and LOGICAL forms are, but I double they used *.

(I presume that's "doubt they used", not "double they used". Funny how the fingers think they know what word you've started and go off and do their own thing, eh?)


For future reference, the FORTRAN 77 standard and MIL-STD 1753 extensions to it are online at the following two addresses, respectively:
http://www.fortran.com/fortran/F77_std/rjcnf.html
http://www.gre.ac.uk/~physica/mil/milspec.html


The only form of type specification in FORTRAN 77 that used an * is the CHARACTER type-statement, which used it as part of the optional length specifier -- e.g., CHARACTER*4 STR or CHARACTER STR*4 would specify STR as a character entity containing four characters. See section 8.4 for details.

My guess is that the forms for real and integer were extensions of this concept, specifying the number of bytes that the number's representation took up.

So, in answer to the original question, the FORTRAN 77 standard did not have non-default kinds, and thus did not have a preferred form for them. The * form may have been the most common way of implementing such as a compiler extension, because of the analogy to the character type, however.

PS: I thought you went to bed.

That was seven hours ago. I presume he was planning to wake up afterwards! :)


- Brooks


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]