a derived type: TYPE entry ! type for sparse matrix REAL :: value INTEGER :: index TYPE(entry), POINTER :: next ! note recursion END TYPE entry and we can define the beginning of a linked chain of such entries: TYPE(entry), POINTER :: chain After suitable allocations and definitions, the first two entries could be addressed as chain%value chain%next%value chain%index chain%next%index chain%next chain%next%next but we would normally define additional pointers to point at, for instance, the first and current entries in the list. Association A pointer's association status is one of Some care has to be taken not to leave a pointer 'dangling' by use of DEALLOCATE on its target without nullifying any other pointer referring to it. The intrinsic function ASSOCIATED can test the association status of a defined pointer: IF (ASSOCIATED(pointer)) THEN or between a defined pointer and a defined target (which may, itself, be a pointer): IF (ASSOCIATED(pointer, target)) THEN An alternative way to initialize a pointer, also in a specification statement, is to use the NULL function: REAL, POINTER, DIMENSION(:) :: vector => NULL() ! compile time vector => NULL() ! run time Pointers in expressions and assignments For intrinsic types we can 'sweep' pointers over different sets of target data using the same code without any data movement. Given the matrix manipulation y = B C z, we can write the following code (although, in this case, the same result could be achieved more simply by other means): REAL, TARGET :: b(10,10), c(10,10), r(10), s(10), z(10) REAL, POINTER :: a(:,:), x(:), y(:) INTEGER mult : DO mult = 1, 2 IF (mult == 1) THEN y => r ! no data movement a => c x => z ELSE y => s ! no data movement a => b x => r END IF y = MATMUL(a, x) ! common calculation END DO For objects of derived type we have to distinguish between pointer and normal assignment. In TYPE(entry), POINTER :: first, current : first => current the assignment causes first to point at current, whereas first = current causes current to overwrite first and is equivalent to first%value = current%value first%index = current%index first%next => current%next Pointer arguments If an actual argument is a pointer then, if the dummy argument is also a pointer, it must have same rank, it receives its association status from the actual argument, it returns its final association status to