summaryrefslogtreecommitdiff
path: root/doc/source/f2py/code/allocarr.f90
diff options
context:
space:
mode:
authorRohit Goswami <rog32@hi.is>2021-09-19 17:01:16 +0000
committerRohit Goswami <rog32@hi.is>2021-09-19 17:52:00 +0000
commit156c005422b020b6fdcd27fc39211708f84f91cb (patch)
treea07055cb48d9d70f70f388f7e539c3192e4abde3 /doc/source/f2py/code/allocarr.f90
parent80c28d12a4500e12b194d62107c61d37703c0f93 (diff)
downloadnumpy-156c005422b020b6fdcd27fc39211708f84f91cb.tar.gz
MAINT,DOC: Refactor, syntax highlighting for f2py
Diffstat (limited to 'doc/source/f2py/code/allocarr.f90')
-rw-r--r--doc/source/f2py/code/allocarr.f9016
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/source/f2py/code/allocarr.f90 b/doc/source/f2py/code/allocarr.f90
new file mode 100644
index 000000000..e0d6c2ec8
--- /dev/null
+++ b/doc/source/f2py/code/allocarr.f90
@@ -0,0 +1,16 @@
+module mod
+ real, allocatable, dimension(:,:) :: b
+contains
+ subroutine foo
+ integer k
+ if (allocated(b)) then
+ print*, "b=["
+ do k = 1,size(b,1)
+ print*, b(k,1:size(b,2))
+ enddo
+ print*, "]"
+ else
+ print*, "b is not allocated"
+ endif
+ end subroutine foo
+end module mod