finalyze moving

This commit is contained in:
2025-03-12 14:28:04 +03:00
parent f840006398
commit 033bbce220
774 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
function allocateUsingFunction()
integer AllocateStatus, DeAllocateStatus
real, dimension(:), allocatable :: arr
real allocateUsingFunction
parameter (nx = 10, nx1 = nx + 1)
allocate(arr(0:nx1), STAT = AllocateStatus)
IF (AllocateStatus /= 0) STOP "*** Not enough memory ***"
do i = 0, nx1
arr(i) = 1
enddo
allocateUsingFunction = arr(0)
deallocate (arr, STAT = DeAllocateStatus)
RETURN
end function allocateUsingFunction
program allocatablesmoketest
real funcResult
real, dimension(:), allocatable :: rra
funcResult = allocateUsingFunction()
print*, "Result", funcResult
end