File: ford_test_program_expected.f90

package info (click to toggle)
ford 7.0.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,000 kB
  • sloc: python: 11,852; f90: 419; javascript: 51; fortran: 45; makefile: 23
file content (45 lines) | stat: -rw-r--r-- 1,169 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
program ford_test_program
!! Simple Fortran program to demonstrate the usage of FORD and to test its installation
use iso_fortran_env, only: output_unit, real64
implicit none
real (real64) :: global_pi = acos(-1)
!! a global variable, initialized to the value of pi
!!
type foo
integer :: foo_stuff
contains
procedure :: do_foo_stuff
end type
type, extends(foo) :: bar
end type
write(output_unit,'(A)') 'Small test program'
call do_stuff(20)
contains
subroutine do_foo_stuff(this)
class(foo) :: this
end subroutine
subroutine do_stuff(repeat)
!! This is documentation for our subroutine that does stuff and things.
!! This text is captured by ford
integer, intent(in) :: repeat
!! The number of times to repeatedly do stuff and things
integer :: i
!! internal loop counter
!!
!!
do i=1,repeat
global_pi = acos(-1)
end do
end subroutine do_stuff
subroutine linalg(A,x,b)
!! Solve Ax = b with linear algebra magic
real, intent(in) :: A(:,:)
!! The a matrix to invert etc.
real, intent(in) :: b(:)
!! The right hand side
real, intent(out) :: x(:)
!! The solution to Ax = b
!!
!! do some stuff, ensure proper bounds etc.
end subroutine linalg
end program ford_test_program