I'm curious what the best way to return an array of data from inside a subroutine is when the size of the array can't be determined until one is already inside the subroutine.
Due to the nature of the calculation, I can't predict how much storage space I will need before executing the subroutine.
Is it legal to have an allocatable array as a dummy argument of intent "out" and then allocate it inside the subroutine? Or is there a better way to handle this situation?
Thanks in advance!
-Jon
Due to the nature of the calculation, I can't predict how much storage space I will need before executing the subroutine.
Is it legal to have an allocatable array as a dummy argument of intent "out" and then allocate it inside the subroutine? Or is there a better way to handle this situation?
Thanks in advance!
-Jon