Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(bidir_node), | intent(in) | :: | this |
Returns a pointer to the previous node in the chain. If this node does not point at a previous one one, then a null pointer is returned.
function get_prev(this)
!* Author: Chris MacMackin
! Date: February 2016
!
! Returns a pointer to the previous node in the chain. If this node
! does not point at a previous one one, then a null pointer is
! returned.
!
class(bidir_node), intent(in) :: this
class(bidir_node), pointer :: get_prev
if (this%has_prev()) then
get_prev => this%prev
else
get_prev => null()
end if
end function get_prev