Skip to content

Nested string in src/framework/mpas_io.F breaks NEC compiler #352

Open
@cponder

Description

@cponder

I believe these lines in src/framework/mpas_io.F are legal w.r.t. the Fortran standard:

4607          call mpas_log_write('Attribute ''' // trim(attName) // ''' has a value longer than StrKIND. ' // &
4608              'It will be cut to a length of $i', MPAS_LOG_WARN, intArgs=(/StrKIND/) )

The NEC 2.3.1 compiler is reporting it as a failure in the line continuation.
I suggested that the NEC people fix their compiler, but on the other hand, it's more readable when you nest different kinds of quotes

4607    call mpas_log_write("Attribute '" // trim(attName) // "' has a value longer than StrKIND. " // &
4608            "It will be cut to a length of $i", MPAS_LOG_WARN, intArgs=(/StrKIND/) )

and the compiler takes this input without any problem.
Would you consider changing the code, just to make it more generally compatible?
The above source snippet is from MPAS-A v7.0.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions