sue132
- 14
- 0
Hi,
I need some help with allocating arrays dynamically.
I have an array whose size keeps changing at each step - I start with a row vector and add another row vector at each step of a cycle. I need to use this new array for further calculations.
I've been trying to declare the arrays as allocatable, and then allocate them within a do-loop, but I haven't been able to get it working properly.
I am still not very clear with what happens when you deallocate the memory for that particular array. If the data is lost, then to store it before deallocation, do I use another array? How do I specify the size of that array?
Any help would be greatly appreciated.
Thank you
I need some help with allocating arrays dynamically.
I have an array whose size keeps changing at each step - I start with a row vector and add another row vector at each step of a cycle. I need to use this new array for further calculations.
I've been trying to declare the arrays as allocatable, and then allocate them within a do-loop, but I haven't been able to get it working properly.
I am still not very clear with what happens when you deallocate the memory for that particular array. If the data is lost, then to store it before deallocation, do I use another array? How do I specify the size of that array?
Any help would be greatly appreciated.
Thank you