libsim  Versione6.3.0

◆ optio_c()

character(len=len) function, public optional_values::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 125 del file optional_values.f90.

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

Generated with Doxygen.