GNOME Bugzilla – Bug 695274
square brackets in Fortran
Last modified: 2013-03-06 17:25:44 UTC
Square brackets [ ] where introduced in Fortran 2003 tob e used instead of (/ /) for array constructors. In the following case -----------------begin math.f90 real(pReal), dimension(6), parameter, private :: & nrmMandel = [& 1.0_pReal, 1.0_pReal, 1.0_pReal,& 1.414213562373095_pReal, 1.414213562373095_pReal, 1.414213562373095_pReal ] !< weighting for Mandel notation (forward) -----------------end math.f90 they are not treated correctly. Doxygen finds two entities: -----------------begin documentation real(preal), dimension(6), parameter, public math::invnrmmandel = [ 1.0_pReal real(preal), dimension(6), parameter, public math::_preal -----------------end documentation where pReal is a kind(precision) specification for real numbers with old style brackets, it works perfectly fine, even with all the line breaks. -----------------begin math.f90 real(pReal), dimension(6), parameter, private :: & nrmMandel = (/& 1.0_pReal, 1.0_pReal, 1.0_pReal,& 1.414213562373095_pReal, 1.414213562373095_pReal, 1.414213562373095_pReal /) !< weighting for Mandel notation (forward) -----------------end math.f90 -----------------begin documentation real(preal), dimension(6), parameter, private math::nrmmandel = (/ 1.0_pReal, 1.0_pReal, 1.0_pReal, 1.414213562373095_pReal, 1.414213562373095_pReal, 1.414213562373095_pReal /) -----------------end documentation In case any help/examples/explanation is needed, please don't hesitate to ask me
*** This bug has been marked as a duplicate of bug 639954 ***