libsim  Versione 7.1.9

◆ fchar_to_cstr()

integer(kind=int_b) function, dimension(len(fchar)+1), public char_utilities::fchar_to_cstr ( character(len=*), intent(in)  fchar)

Converts a CHARACTER variable into a string which can be directly passed to a C function requiring a null-terminated const char* (input) argument.

If the result is going to be stored into an array, this has to be dimensioned with a suitable size (LEN(fchar) + 1 ).

Parametri
[in]fcharvariable to be converted

Definizione alla linea 761 del file char_utilities.F90.

762 ALLOCATE(lsv(nword), lev(nword))
763 nword = 0
764 le = 0
765 DO WHILE(.true.)
766  ls = f_nblnk(input_string(le+1:), lsep) + le ! search next nonblank
767  IF (ls > len(input_string)) EXIT ! end of words

Generated with Doxygen.