double linked list -- deallocate all list

double linked list -- deallocate all list

hi everyone,In my program I create a double linked list.I would like to know if it is possible to deallocate all the list in a simple way.I mean, Can I apply a sort of code like:

or, as I suppose, I have to move across the entire list and ramove the node one by one?In the second case how can I do?cheers

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I am going to assume you are coding in Fortran, as the syntax you show is closer to Fortran than C/C++.

In order to have a linked list you would have to use POINTER components of a derived type. There is no way to deallocate the whole list in one statement.

If you need further help on Fortran, please ask in one of our Fortran-specific forums. We have one for Windows and another for Linux/Mac.

Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today