Skip to content

Avoid long lines in f90 include file

Jellby requested to merge Jellby/libxc:shorter_inc_lines into master

Maximum characters per line in (portable) f90 code is 132.

Arguably this limit should not include comments, at least there is no functional drawback in a compiler's truncating comments beyond the 132th character. However, some compilers complain (sometimes loudly) if a line contains more than 132 characters, even if it's just a comment, e.g. the NAG compiler.

This MR simply changes the format of the generated libxc_inc.f90 from:

  integer(c_int), parameter, public :: XC_LDA_C_CHACHIYO_MOD          = 307  ! Chachiyo simple 2 parameter correlation with modified scaling

to:


! Chachiyo simple 2 parameter correlation with modified scaling
  integer(c_int), parameter, public :: XC_LDA_C_CHACHIYO_MOD          = 307

which plays is more agreeable to said compilers.

Merge request reports