Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
module BoxMod
contains
subroutine BoxCreate (blist, bsize)
! Declare an allocatable parameter
integer, allocatable, intent (inout) :: blist(:)
integer, intent (in) :: bsize
integer :: b
allocate (blist(bsize))
do b = 1, bsize
blist(b) = 0
enddo
return
end subroutine BoxCreate
subroutine BoxDelete (blist)
integer, allocatable, intent (inout) :: blist(:)
deallocate (blist)
return
end subroutine BoxDelete
end module BoxMod
program main
use BoxMod
integer, dimension(:), allocatable :: alist
integer:: amaxi
parameter (amaxi = 20)
call BoxCreate (alist, amaxi)
do i = 1, amaxi, 1
alist(i) = i * i
enddo
do i = 1, amaxi, 1
write (*,*) alist(i)
enddo
call BoxDelete (alist)
stop
end program main