get_amap_t Function

public function get_amap_t(this, kv) result(r)

Arguments

Type IntentOptional Attributes Name
class(amap_t), intent(in) :: this
character(len=*), intent(in) :: kv

Return Value type(value_t)


Contents

Source Code


Variables

Type Visibility Attributes Name Initial
integer, public :: idx
type(key_t), public :: k

Source Code

    function get_amap_t(this, kv) result(r)
        class(amap_t), intent(in)    :: this
        character(len=*), intent(in) :: kv
        type(value_t) :: r
        type(key_t) :: k
        integer :: idx
        k = kv
        idx = this%find(k)
        if (idx > 0) then
            r = this%pairs(idx)%v
        else
            r = value_t()
        end if
    end function get_amap_t