libsim  Versione7.2.3

◆ c2d()

elemental double precision function, public char_utilities::c2d ( character(len=*), intent(in)  string)

Convert a character string to a double value if possible.

It is ELEMENTAL so it works with arrays of any shape. It returns missing value if the input cannot be converted or is empty or missing.

Parametri
[in]stringstring to be represented as DOUBLE PRECISION

Definizione alla linea 741 del file char_utilities.F90.

741  lsep = sep
742 ELSE
743  lsep = ' '
744 ENDIF
745 
746 nword = 0
747 le = 0
748 DO WHILE(.true.)
749  ls = f_nblnk(input_string(le+1:), lsep) + le ! search next nonblank
750  IF (ls > len(input_string)) EXIT ! end of words
751  le = index(input_string(ls:), lsep)
752  IF (le == 0) THEN
753  le = len(input_string)
754  ELSE
755  le = le + ls - 2
756  ENDIF
Index method.

Generated with Doxygen.