Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(linked_node), | intent(in) | :: | this |
Returns a pointer to the node which this ones points to, i.e. the next node in the chain. If this node does not point at another one, then a null pointer is returned.
function get_next(this)
!* Author: Chris MacMackin
! Date: February 2016
!
! Returns a pointer to the node which this ones points to, i.e. the
! next node in the chain. If this node does not point at another
! one, then a null pointer is returned.
!
class(linked_node), intent(in) :: this
class(linked_node), pointer :: get_next
if (this%has_next()) then
get_next => this%next
else
get_next => null()
end if
end function get_next