Skip to content

Some commas in format specifiers are optional #484

@arporter

Description

@arporter

The standard says:
Image
and Martin has found that, e.g.:

      program my_prog

4     format(/1x,'GET_INITIAL -  unable to find variable:',1x,A,
     &    /15x' in input NetCDF file:',1x,A,
     &     1x,' ==> Initialized to zero state.',
     &    /18x' >> CAUTION in case of #define EXACT_RESTART << ',
     &    /21x ' If it is the case ',
     &    /21x'    - OK if it is a ''cold start''',
     &        ' i.e coming from a 3rd-party initial file',
     &    /21x'    - otherwise if it is a ''hot start'' ',
     &         'i.e from a restart file produced by this code: ',
     &    /21x'      => problem: run is not restartable',
     &    /21x'      => check your initial file')

      end program

causes fparser2 to fail.

If commas are added:

      program my_prog

4     format(/1x,'GET_INITIAL -  unable to find variable:',1x,A,
     &    /15x,' in input NetCDF file:',1x,A,
     &     1x,' ==> Initialized to zero state.',
     &    /18x,' >> CAUTION in case of #define EXACT_RESTART << ',
     &    /21x,' If it is the case ',
     &    /21x,'    - OK if it is a ''cold start''',
     &        ' i.e coming from a 3rd-party initial file',
     &    /21x,'    - otherwise if it is a ''hot start'' ',
     &         'i.e from a restart file produced by this code: ',
     &    /21x,'      => problem: run is not restartable',
     &    /21x,'      => check your initial file')

      end program

then fparser2 succeeds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions