This is easiest if you create a user-defined type with your data elements and a pointer to the next element. This assumes a singly linked list. eg.
type MyList_type integer :: FirstItem real :: SecondItem etc type (MyList_type), pointer :: next_ptr => null () end type MyList_type
Then create the first item with "allocate". After that, you write code to move through the list, using next_ptr to move through the list. Use the "linked" internal function to check if next_ptr is defined yet, or if you have reached the end of the list.
If you are writing a regular Fortran sequential program, then locking / no waiting is not a problem. If you are writing a multi-threaded / parallel program, then consistent access to variables is a problem.
Here are some more examples: http://fortranwiki.org/fortran/show/Linked+list . Moreover, Fortran related lists are clearly explained in the book Fortran 90/95 Explained by Metcalf and Reed.
source share