add_metadata_character Subroutine

public subroutine add_metadata_character(sfile, metadata_name, metadata)

Arguments

Type IntentOptional AttributesName
type(sdatio_file), intent(in) :: sfile
character(len=*), intent(in) :: metadata_name
character(len=*), intent(in) :: metadata

Contents


Source Code

  subroutine add_metadata_character(sfile, metadata_name, metadata)
    implicit none
    type(sdatio_file), intent(in) :: sfile
    character(*), intent(in) :: metadata_name
    character(*), intent(in) :: metadata
#ifdef ISO_C_BINDING
    interface
       subroutine sdatio_add_metadata(sfile, metadata_type, metadata_name, metadata) &
            bind(c, name='sdatio_add_metadata')
         use iso_c_binding
         import sdatio_file
         type(sdatio_file) :: sfile
         integer(c_int), value :: metadata_type
         character(c_char) :: metadata_name(*)
         character(c_char) :: metadata(*)
       end subroutine sdatio_add_metadata
    end interface
    !allocate(dimension_list_reversed(len(dimension_list)))
    !if (len(dimension_list) .gt. 0) then

    call sdatio_add_metadata(sfile, SDATIO_CHAR,&
         metadata_name//c_null_char, metadata//c_null_char)
#endif
  end subroutine add_metadata_character