Open jrwrigh opened 4 years ago
Thanks for the report. However, I think this is technically invalid? As far as I know, trailing line comments are only allowed in free-form Fortran.
There is an "intersection" style that places ampersands at the start and end of files as below, but other than that I don't think this is technically allowed.
if ((longVariableX .neq. longVariableY) .and. & ! ensure X != Y
& (longVariableZ .eq. longVariableX)) ! ensure Z == X
I can certainly add support for trailing line comments in fixed-form code, but I prefer to limit extensions like that to widely supported ones. Do you know if most compliers (ie. GNU, Intel, Cray, etc.) support this style without complaining?
trailing line comments are only allowed in free-form Fortran.
Does this only support fixed-form? My code base is a weird mix of "interpreted as free-form but written in fixed-form (sort of)" so being able to do both would be quite nice.
Do you know if most compliers (ie. GNU, Intel, Cray, etc.) support this style without complaining?
The offending code has been compiled on several dozen HPC machines, so I'd imagine that it would work with all of them. That said, I can only vouch for Intel and GNU compilers.
If I have the following if statement:
I get an error for it's respective subroutine saying there's an "Unexpected end of scope" error.
Removing the first comment eliminates the error. ie:
will not cause an error.