- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to set up something like the NEW statement in C++, where I don't want to allocate permanent storage, but only according to the size of the problem at execution time.
Does Fortran allow me to define an array that does not exist at compilation time, where the size can be defined by user input?
Even in some versions of C++ the user has to commit himself at compilation time regarding the sizes of arrays.
Does Fortran allow me to define an array that does not exist at compilation time, where the size can be defined by user input?
Even in some versions of C++ the user has to commit himself at compilation time regarding the sizes of arrays.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes. Look at ALLOCATABLE arrays. If an ALLOCATABLE array is a local variable in a routine, and not given the SAVE attribute, it gets automatically deallocated on routine exit.
Steve
Steve
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page