-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #451 from Fortran-FOSS-Programmers/fix-bound-proce…
…dure-docstrings Fix type-bound procedure docs not showing full docstring
- Loading branch information
Showing
6 changed files
with
215 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
module ford_example_type_mod | ||
implicit none | ||
|
||
private | ||
|
||
type, public :: example_type | ||
!! Some type that can say hello. | ||
!! | ||
!! This type's docs demonstrate how documentation is rendered | ||
!! differently for public/private components, and for type-bound | ||
!! procedure bindings and the procedures themselves. | ||
private | ||
integer :: counter = 1 | ||
!! Internal counter | ||
character(len=:), allocatable, public :: name | ||
!! Name of this instance | ||
contains | ||
procedure :: say_hello => example_type_say | ||
!! This will document the type-bound procedure *binding*, rather | ||
!! than the procedure itself. The specific procedure docs will be | ||
!! rendered on the `example_type` page. | ||
end type example_type | ||
|
||
contains | ||
|
||
subroutine example_type_say(self) | ||
!! Prints how many times this instance has said hello | ||
!! | ||
!! This subroutine has more documentation that won't appear in the | ||
!! summary in the procedure list, but should appear in the type | ||
!! page. | ||
class(example_type), intent(in) :: self | ||
write(*, '(a, " has said hello ", i0, " times.")') self%name, self%counter | ||
self%counter = self%counter + 1 | ||
end subroutine example_type_say | ||
|
||
end module ford_example_type_mod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters