- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let's consider the statement "DEALLOCATE(MY_ARRAY,STAT=ERROR)".
In what cases would a memory deallocation attempt would be unsuccessful (and therefore justifying the STAT=ERROR part of the statement) ?
Thanks!
Olivier
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let's consider the statement "DEALLOCATE(MY_ARRAY,STAT=ERROR)".
In what cases would a memory deallocation attempt would be unsuccessful (and therefore justifying the STAT=ERROR part of the statement) ?
Thanks!
Olivier
From the help :
"If the DEALLOCATE statement specifies an array that is not currently allocated, an error occurs."
also
"If no STAT variable is specified and an error condition occurs, program execution terminates."
Thatmeans you can code your program defensively to ignore this error if it occurs by specifying STAT and testing or ignoring it. If STAT is not there, then the program stops if an error occurs.
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If MY_ARRAY is a POINTER that is not pointing to a whole, allocated array then you'd get an error as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If MY_ARRAY is a POINTER that is not pointing to a whole, allocated array then you'd get an error as well.
Oh, I see. I forgot about the pointer case for an array subsection.
Thanks a lot!
Olivier
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page