Project

General

Profile

new_empty Function

private function new_empty(verbose, initial_size) result(this)

Arguments

Type IntentOptional AttributesName
logical, intent(in), optional :: verbose
integer, intent(in), optional :: initial_size

Return Value type(vector_ref)

Called By

proc~~new_empty~2~~CalledByGraph proc~new_empty~2 new_empty interface~vector_ref vector_ref interface~vector_ref->proc~new_empty~2

Source Code

    function new_empty(verbose, initial_size) result(this)
        logical, optional, intent(in) :: verbose
        integer, optional, intent(in) :: initial_size
        type(vector_ref) :: this
        this%maximum_size = vector_initial_size
        if(present(initial_size)) this%maximum_size = initial_size
        if(present(verbose)) then
            this%verbose = verbose
        end if
        allocate(this%items(this%maximum_size))
        if(this%verbose) then
            print *, 'created vector_ref (', this%current_size, '/', &
                     this%maximum_size, ' elements)'
        end if        
    end function new_empty


© 2016
self was developed by
Documentation generated by FORD