assoc_list_get_key Subroutine

public subroutine assoc_list_get_key(a, i, key, stat)

Arguments

Type IntentOptional Attributes Name
type(assoc_list_t), intent(in) :: a
integer, intent(in) :: i
character(len=*), intent(out) :: key
integer, intent(out) :: stat

Contents

Source Code


Source Code

subroutine assoc_list_get_key(a,i,key,stat)
type(assoc_list_t), intent(in)    :: a
integer, intent(in)               :: i
character(len=*), intent(out)     :: key
integer, intent(out)              :: stat

if (i > a%nitems) then
   stat = -1
   return
endif
key = a%key(i)
stat = 0
end subroutine assoc_list_get_key