repo.or.cz
/
wrffire.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
added README_changes.txt
[wrffire.git]
/
wrfv2_fire
/
phys
/
ttt.F
blob
baaa958bb9fff4f9d244b2e4c28d7a699769788a
1
module m
2
real, pointer:: p(:)
3
contains
4
subroutine y(n)
5
implicit none
6
integer n,i
7
do i=1,n
8
p(i)=i*i
9
enddo
10
end subroutine y
11
end module m
12
13
subroutine a(n)
14
use m
15
implicit none
16
integer n,i
17
real, target:: p_t(n)
18
! at this point p_t has memory but no values set yet
19
! g95 complains that p_t used but not set
20
p => p_t
21
! set p inside
22
call y(n)
23
print *,(p(i),i=1,n)
24
end subroutine a
25
26
program x
27
use m
28
implicit none
29
call a(3)
30
!call y(3)
31
end program x