Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | key | |||
character(len=*), | intent(in) | :: | val |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | place |
subroutine update(key,val)
character(len=*),intent(in) :: key
character(len=*),intent(in) :: val
integer :: place
! find where string is or should be
call locate(keywords,key,place)
! if string was not found insert it
if(place.lt.1)then
call insert(keywords,key,abs(place))
call insert(values,val,abs(place))
else ! replace
call replace(values,val,place)
endif
end subroutine update