1

I have a very short program:

!> This is a test.
program main

    implicit none

    integer :: i
    real :: a

    !> THIS IS A LOOP!
    do i = 1,10
        a = 2.0*i
        write(*,*) a
    end do

end program main

But in the generated Doxygen docs, only This is a test. is shown.
How can I get THIS IS A LOOP! to show? I know it works for subroutines and modules.

  • Welcome, I suggest taking the [tour]. Be aware that unlike C, where everything is a function, Fortran distinguishes several types of compilation units: programs, subroutines, functions, modules and also less used block data. – Vladimir F Героям слава Sep 14 '21 at 06:10

1 Answers1

1

Well, just found a workaround here.

I'd have to do something like this:

program test

call main()

contains

!> This is a test.
subroutine main()

    implicit none

    integer :: i
    real :: a

    !> - THIS IS A LOOP!
    do i = 1,10
        a = 2.0*i
        write(*,*) a
    end do

end subroutine main

end program test