get_c_string_length Function

private function get_c_string_length(s) result(nchars)

Arguments

Type IntentOptional Attributes Name
character(kind=C_CHAR, len=1), intent(in) :: s(*)

Return Value integer


Called by

proc~~get_c_string_length~~CalledByGraph proc~get_c_string_length get_c_string_length proc~init_gvec_to_gene_c init_gvec_to_gene_c proc~init_gvec_to_gene_c->proc~get_c_string_length proc~test_print_char_rank2_array_c test_print_char_rank2_array_c proc~test_print_char_rank2_array_c->proc~get_c_string_length proc~test_print_file_name_c test_print_file_name_c proc~test_print_file_name_c->proc~get_c_string_length proc~write_data_to_vtk_c write_data_to_vtk_c proc~write_data_to_vtk_c->proc~get_c_string_length

Source Code

  function get_c_string_length(s) result(nchars)
    character(kind=C_CHAR, len=1), intent(in) :: s(*)
    integer :: nchars

    nchars = 0
    do while( s(nchars+1).ne.C_NULL_CHAR )
      nchars = nchars + 1
    end do
  end function get_c_string_length