libsim Versione 7.1.11

◆ fchar_to_cstr()

integer(kind=int_b) function, dimension(len(fchar)+1), public 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.

762ALLOCATE(lsv(nword), lev(nword))
763nword = 0
764le = 0
765DO 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.