update Subroutine

subroutine update(key, val)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: key
character(len=*), intent(in) :: val

Contents

Source Code


Variables

Type Visibility Attributes Name Initial
integer, public :: place

Source Code

      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