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 715172 - Consistently document Fortran's equivalent function bodies
Consistently document Fortran's equivalent function bodies
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.5
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2013-11-25 15:46 UTC by Stefan
Modified: 2013-12-24 18:59 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Stefan 2013-11-25 15:46:19 UTC
Hi there!

I just wanted to report that Doxygen is not consistently documenting equivalent function bodies in Fortran. As an example, have a look to that dummy code:
> MODULE my_mod
> 
> CONTAINS
> 
> !> f1
> ELEMENTAL INTEGER FUNCTION func1()
> END FUNCTION
> 
> !> f2
> ELEMENTAL FUNCTION func2()
>     INTEGER :: func2
> END FUNCTION
> 
> !> f3
> ELEMENTAL FUNCTION func3() RESULT(new)
>     INTEGER :: new
> END FUNCTION
> 
> !> f4
> INTEGER ELEMENTAL FUNCTION func4() RESULT(new)
> END FUNCTION
> 
> END MODULE
> 
> PROGRAM main
>     USE my_mod
> 
> END PROGRAM
All four functions are doing the same. They are equivalent. The coding style is just a question of taste. 
Doxygen, however, is documenting each differently. Not even capitalization is consistent. Would be awesome to fix this. 

Cheers and all the very best, 
Stefan
Comment 1 albert 2013-12-01 10:06:21 UTC
We have here a number of problems:
- f2 not showing integer with function definition, this has been solved by bug_706804
- inconsistency between upper and lower case, although controversial (see e.g. bug_695270, bug_712701) I pushed a solution to git (pull request 59) for consistency.
- order of e.g. elemental and integer in equivalent function definitions (f1 and f4). I think we should not change this, it is the choice of the original software developer (the used coding standard) to write either elemental integer or integer elemental.
Comment 2 Dimitri van Heesch 2013-12-07 22:30:12 UTC
Thanks, I've just merged the pull request.
Comment 3 Stefan 2013-12-19 15:36:30 UTC
> - f2 not showing integer with function definition, this has been solved by
bug_706804
All right. The fix might make it into a future release. So far I am using Doxygen from trunk. 

> - inconsistency between upper and lower case, although controversial (see e.g.
> bug_695270, bug_712701) I pushed a solution to git (pull request 59) for
> consistency.
Right. For my point of view there are only two doable ways. Either change the case of all statements or leave it untouched as in the sources. The latter I prefer. 
Actually, the Fortran standard doesn't help much. It says in 1.4.5: 
> Particular statements and attributes are identified in the text by an upper-case keyword, e.g., "END statement".
For readability I am used to capitalize all keywords. However, this is just a question of taste. With C bindings, changing cases in Fortran code may become a real issue. 

Thank you very much for your fix! It is pleasing my eyes. 

> - order of e.g. elemental and integer in equivalent function definitions (f1
> and f4). I think we should not change this, it is the choice of the original
> software developer (the used coding standard) to write either elemental integer
> or integer elemental.
Agreed.
Comment 4 Dimitri van Heesch 2013-12-24 18:59:38 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.6. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information 
that you think can be relevant (preferrably in the form of a self-contained example).