Menu

Doxygen use in Fortran & pFUnit

2013-11-21
2013-11-26
  • Michael L. Rilee

    Just wished to capture a few questions about using Doxygen in pFUnit…

    1. How much Fortran does Doxygen understand? E.g. will it parse …intent(inout)… and emit something useful.
    2. Related: Can it do anything useful with dummy arguments?
    3. Can it usefully interpret Fortran-style OO & module conventions?
     
  • Matthew Hambley

    Matthew Hambley - 2013-11-26

    We looked into this issue recently and I've just asked my colleague who did the work.

    He tells me that Doxygen understands Fortran77 pretty well so will do what you would expect with function arguments. Which is to say it will list them if you provide no documentation. If you do then it will present those descriptions next to the argument names.

    What it doesn't really understand is Fortran90 so probably not INTENT and certainly not MODULEs.

    It is utterly at sea with Fortran03 OO stuff. In particular it doesn't understand interfaces.

    On the up side I am told that the shortcomings seem to be due not to a disinterest in Fortran support among the Doxygen curators. Instead it is down to a shortage of time and talent. So if someone were to offer them patches to improve matters they would probably be amenable to applying them.

    From what I have seen it looks like they got the mapping between Fortran code structures and the Doxygen data model slightly wrong. I suspect the error came about because they tried to do Fortran 77 first.

    The problem is that Doxygen is designed for OO code first and foremost. They would probably have been better following the route they took with the C languages. Supporting C++ first and then striping it down to support C.

     

    Last edit: Matthew Hambley 2013-11-26

Log in to post a comment.