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.
real, allocatable, dimension (:) :: rValue ! declare your variables like this
.
.
read (*,*) N ! user input
allocate (rValue(N), stat = irslt) ! allocate memory for your array
if (irslt .ne. 0) then
write (*,*) 'cannot allocate memory' ! errormessage
! continue as appropriate in your prog
endif
rValue = 0.0 ! initalize your new array some way or other
.
(use array)
.
deallocate (rValue) ! deallocate if no longer needed to free memory