- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Can someone please help me understand what are allocatable arrays while writing a code in Fortran? When do we allocate/deallocate arrays? What is the role of the module?
Thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is advisable to consult the documentation under the index of "allocatable arrays".
Essentially, an allocatable array is a placeholder of a descriptor that will define the rank (number of dimensions), size(s), and extents of an array who's capacity is unknown until runtime.
Older language standards require explicit allocation and deallocation, newer language features permit automatic allocate, reallocate, and deallocate of arrays.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ms. Yadav
Judging from your question, I would suggest that some background reading would be the best way to become familiar with the purpose/operation/use of allocatable arrays. BUT, most books on Fortran are little more than a reiteration of the latest Fortran standard which simply states facts rather than provide background and (actually) assume the reader already understands Fortran concepts. They are very difficult to learn from. There is one book that I can recommend: Modern Fortran Explained by Metcalf, Reid, and Cohen.
I think you will find the book as a whole to be very helpful and the section on alloacatable arrays particularly so.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Jim and David
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page