Project

General

Profile

add_item Subroutine

private recursive subroutine add_item(this, new_stuff)

Arguments

Type IntentOptional AttributesName
class(vector), intent(inout) :: this
class(*), intent(in), target:: new_stuff

Variables

TypeVisibility AttributesNameInitial
class(*), public, pointer:: my_stuff

Source Code

    recursive subroutine add_item(this, new_stuff)
        class(vector),intent(inout) :: this
        class(*), target, intent(in) :: new_stuff
        class(*), pointer :: my_stuff
        if(this%get_verbose()) print *, 'vector%add_item begin'
        allocate(my_stuff, source=new_stuff)
        call this%vector_ref%add(my_stuff)
        if(this%get_verbose()) then
            print *, 'added to vector (', this%length(), '/', &
                     this%capacity(), ' elements)'
        end if
        if(this%get_verbose()) print *, 'vector%add_item end'
    end subroutine add_item


© 2016
self was developed by
Documentation generated by FORD