|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
mecej4
Joined: 31 Oct 2006 Posts: 1886
|
Posted: Wed Mar 03, 2021 1:23 am Post subject: Fixed form, '!' in column 6 |
|
|
I find myself working with a package written in Fortran 77 in the 1990s, and it uses an exclamation mark in column 6 to indicate continuation. The Fortran standards explicitly permit this. The Fortran 95 standard, for instance, says in 3.3.2.1:
Quote: | The character "!" initiates a comment except when it appears within a character context or in character position 6. |
FTN95, in contrast, treats a fixed form source line with blanks in columns 1-5 and a '!' in column 6 as a comment. Thus
Code: | subroutine BasInf(KAT,MaxIt,TolTh,TolH,lWat,lChem,AtmInF,ShortF,
! SeepF,CheckF,FluxF,FreeD,DrainF)
|
gives rise to the continuation line being treated as a comment, hence giving rise to a syntax error. |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Wed Mar 03, 2021 4:40 am Post subject: |
|
|
Why would they write code like that in 1990's ?
Too smart by half ! |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Wed Mar 03, 2021 9:12 am Post subject: |
|
|
mecej4
Thanks for the bug report. I have made a note that this needs fixing. |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1886
|
Posted: Wed Mar 03, 2021 11:13 am Post subject: Re: |
|
|
JohnCampbell wrote: | Why would they write code like that in 1990's ?
Too smart by half ! |
Many such packages, often from govt. research organizations, were originally written in Fortran-66, then moved to Fortran 77. Fortran 90 had a very long gestation period, and the first Fortran 90 compilers yielded such slow executables that users stuck to Fortran 77 well into the 1990s. The exclamation mark was not used to start in-line comments in the older Fortrans and those did not provide for inline comments. The exclamation mark was not part of the Fortran-77 character set. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Tue Mar 30, 2021 10:19 am Post subject: |
|
|
This has now been fixed for the next release of FTN95. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|