size Function

public function size(lst)

Arguments

Type IntentOptional Attributes Name
type(llist), intent(inout) :: lst

Return Value integer


Contents

Source Code


Variables

Type Visibility Attributes Name Initial
type(llist_node), public, pointer :: this

Source Code

    integer function size(lst)
      type(llist), intent(inout) :: lst
      type(llist_node), pointer  :: this
      size = 0
      this => lst%begin
      do
         if (.not. associated(this)) exit
         size = size + 1
         this => this%next
      end do
    end function size