str_R4P Function

private elemental function str_R4P(no_sign, n) result(str)

The function str_R4P converts real to string. This function achieves casting of real to string.

Arguments

Type IntentOptional AttributesName
logical, intent(in), optional :: no_sign
real(kind=R4P), intent(in) :: n

Return Value character(len=DR4P)


Called by

proc~~str_r4p~~CalledByGraph proc~str_r4p str_R4P interface~str str interface~str->proc~str_r4p proc~vtk_var_xml_list_i2 VTK_VAR_XML_LIST_I2 proc~vtk_var_xml_list_i2->interface~str proc~vtk_var_xml_scal_i4 VTK_VAR_XML_SCAL_I4 proc~vtk_var_xml_scal_i4->interface~str proc~vtk_geo_xml_strg_r4 VTK_GEO_XML_STRG_R4 proc~vtk_geo_xml_strg_r4->interface~str proc~vtk_var_xml_vect_i2 VTK_VAR_XML_VECT_I2 proc~vtk_var_xml_vect_i2->interface~str proc~vtk_var_xml_list_r4 VTK_VAR_XML_LIST_R4 proc~vtk_var_xml_list_r4->interface~str proc~vtk_var_xml_vect_r4 VTK_VAR_XML_VECT_R4 proc~vtk_var_xml_vect_r4->interface~str proc~vtk_var_xml_list_i4 VTK_VAR_XML_LIST_I4 proc~vtk_var_xml_list_i4->interface~str proc~vtk_var_xml_vect_i4 VTK_VAR_XML_VECT_I4 proc~vtk_var_xml_vect_i4->interface~str proc~vtk_var_xml_scal_i8 VTK_VAR_XML_SCAL_I8 proc~vtk_var_xml_scal_i8->interface~str proc~vtk_geo_xml_strg_r8 VTK_GEO_XML_STRG_R8 proc~vtk_geo_xml_strg_r8->interface~str proc~vtk_var_xml_vect_i8 VTK_VAR_XML_VECT_I8 proc~vtk_var_xml_vect_i8->interface~str proc~vtk_geo_xml_rect_r4 VTK_GEO_XML_RECT_R4 proc~vtk_geo_xml_rect_r4->interface~str proc~vtk_var_xml_vect_i1 VTK_VAR_XML_VECT_I1 proc~vtk_var_xml_vect_i1->interface~str proc~vtk_var_xml_scal_i1 VTK_VAR_XML_SCAL_I1 proc~vtk_var_xml_scal_i1->interface~str proc~vtk_var_xml_list_i8 VTK_VAR_XML_LIST_I8 proc~vtk_var_xml_list_i8->interface~str proc~vtk_var_xml_vect_r8 VTK_VAR_XML_VECT_R8 proc~vtk_var_xml_vect_r8->interface~str proc~vtk_var_xml_scal_r4 VTK_VAR_XML_SCAL_R4 proc~vtk_var_xml_scal_r4->interface~str proc~vtk_geo_xml_unst_r4 VTK_GEO_XML_UNST_R4 proc~vtk_geo_xml_unst_r4->interface~str proc~vtk_con_xml VTK_CON_XML proc~vtk_con_xml->interface~str proc~vtk_var_xml_list_i1 VTK_VAR_XML_LIST_I1 proc~vtk_var_xml_list_i1->interface~str proc~vtk_geo_xml_rect_r8 VTK_GEO_XML_RECT_R8 proc~vtk_geo_xml_rect_r8->interface~str proc~vtk_var_xml_scal_i2 VTK_VAR_XML_SCAL_I2 proc~vtk_var_xml_scal_i2->interface~str proc~vtk_var_xml_list_r8 VTK_VAR_XML_LIST_R8 proc~vtk_var_xml_list_r8->interface~str proc~vtk_var_xml_scal_r8 VTK_VAR_XML_SCAL_R8 proc~vtk_var_xml_scal_r8->interface~str proc~vtk_geo_xml_unst_r8 VTK_GEO_XML_UNST_R8 proc~vtk_geo_xml_unst_r8->interface~str interface~vtk_var_xml VTK_VAR_XML interface~vtk_var_xml->proc~vtk_var_xml_list_i2 interface~vtk_var_xml->proc~vtk_var_xml_scal_i4 interface~vtk_var_xml->proc~vtk_var_xml_vect_i2 interface~vtk_var_xml->proc~vtk_var_xml_list_r4 interface~vtk_var_xml->proc~vtk_var_xml_vect_r4 interface~vtk_var_xml->proc~vtk_var_xml_list_i4 interface~vtk_var_xml->proc~vtk_var_xml_vect_i4 interface~vtk_var_xml->proc~vtk_var_xml_scal_i8 interface~vtk_var_xml->proc~vtk_var_xml_vect_i8 interface~vtk_var_xml->proc~vtk_var_xml_vect_i1 interface~vtk_var_xml->proc~vtk_var_xml_scal_i1 interface~vtk_var_xml->proc~vtk_var_xml_list_i8 interface~vtk_var_xml->proc~vtk_var_xml_vect_r8 interface~vtk_var_xml->proc~vtk_var_xml_scal_r4 interface~vtk_var_xml->proc~vtk_var_xml_list_i1 interface~vtk_var_xml->proc~vtk_var_xml_scal_i2 interface~vtk_var_xml->proc~vtk_var_xml_list_r8 interface~vtk_var_xml->proc~vtk_var_xml_scal_r8 interface~vtk_geo_xml VTK_GEO_XML interface~vtk_geo_xml->proc~vtk_geo_xml_strg_r4 interface~vtk_geo_xml->proc~vtk_geo_xml_strg_r8 interface~vtk_geo_xml->proc~vtk_geo_xml_rect_r4 interface~vtk_geo_xml->proc~vtk_geo_xml_unst_r4 interface~vtk_geo_xml->proc~vtk_geo_xml_rect_r8 interface~vtk_geo_xml->proc~vtk_geo_xml_unst_r8

Contents

Source Code


Source Code

  elemental function str_R4P(no_sign,n) result(str)
  !---------------------------------------------------------------------------------------------------------------------------------
  !!The function str\_R4P converts real to string. This function achieves casting of real to string.
  !---------------------------------------------------------------------------------------------------------------------------------

  !---------------------------------------------------------------------------------------------------------------------------------
  implicit none
  logical,   intent(IN), optional:: no_sign ! Flag for leaving out the sign.
  real(R4P), intent(IN)::           n       ! Real to be converted.
  character(DR4P)::                 str     ! Returned string containing input number.
  !---------------------------------------------------------------------------------------------------------------------------------

  !---------------------------------------------------------------------------------------------------------------------------------
  write(str,FR4P) n                 ! Casting of n to string.
  if (n>0._R4P) str(1:1)='+'        ! Prefixing plus if n>0.
  if (present(no_sign)) str=str(2:) ! Leaving out the sign.
  return
  !---------------------------------------------------------------------------------------------------------------------------------
  endfunction str_R4P