libsim Versione 7.2.1

◆ optio_c()

character(len=len) function, public optio_c ( character (len=*), intent(in), optional var,
integer, intent(in) len )

Return the optional value if present, otherwise return missing value.

Unfortunately elemental is not possible here.

Parametri
[in]varvariable to be checked
[in]lenlength of the result

Definizione alla linea 124 del file optional_values.f90.

125CHARACTER (len=*),INTENT(in),OPTIONAL :: var !< variable to be checked
126INTEGER,INTENT(in) :: len
127
128CHARACTER(len=len) :: char
129
130if (present(var))then
131 char=var
132else
133 char=cmiss
134end if
135

Generated with Doxygen.