Skip to content

Commit 0004628

Browse files
committed
add test package
1 parent 75e5503 commit 0004628

File tree

12 files changed

+73
-0
lines changed

12 files changed

+73
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build/*
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
program run1
2+
use file_mod
3+
implicit none
4+
call print_file("run",1)
5+
stop 0
6+
end program run1
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
program run2
2+
use file_mod
3+
implicit none
4+
call print_file("run",2)
5+
stop 0
6+
end program run2
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
program run3
2+
use file_mod
3+
implicit none
4+
call print_file("run",3)
5+
stop 0
6+
end program run3
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
program example1
2+
use file_mod
3+
implicit none
4+
call print_file("example",1)
5+
stop 0
6+
end program example1
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
program example2
2+
use file_mod
3+
implicit none
4+
call print_file("example",2)
5+
stop 0
6+
end program example2
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
program example3
2+
use file_mod
3+
implicit none
4+
call print_file("example",3)
5+
stop 0
6+
end program example3
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
name = "many_targets"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module file_mod
2+
implicit none
3+
public
4+
contains
5+
subroutine print_file(name,id)
6+
character(*), intent(in) :: name
7+
integer, intent(in) :: id
8+
integer :: i
9+
character(len(name)+1) :: nm
10+
write(nm,1)name,id
11+
open(newunit=i,file=nm//'.txt',form="formatted",action="write")
12+
write(i, '(a)') nm
13+
close(i)
14+
1 format(a,i1)
15+
end subroutine print_file
16+
end module file_mod
17+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
program test1
2+
use file_mod
3+
implicit none
4+
call print_file("test",1)
5+
stop 0
6+
end program test1

0 commit comments

Comments
 (0)