After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 695274 - square brackets in Fortran
square brackets in Fortran
Status: RESOLVED DUPLICATE of bug 639954
Product: doxygen
Classification: Other
Component: general
1.8.3
Other All
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2013-03-06 10:09 UTC by dummfikk
Modified: 2013-03-06 17:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description dummfikk 2013-03-06 10:09:41 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
Comment 1 albert 2013-03-06 17:25:44 UTC

*** This bug has been marked as a duplicate of bug 639954 ***