Determines whether a data item can be represented as a logical or not.
More...
Determines whether a data item can be represented as a logical or not.
Currently works only for strings, reals and integers always can be (0=false, otherwise true)
- Parameters
-
- Returns
- Logical whether or not the data can be represented as a logical
Definition at line 98 of file conversions.F90.
◆ string_is_logical()
logical function conversions_mod::conv_is_logical::string_is_logical |
( |
character(len=*), intent(in) |
string | ) |
|
|
private |
Determines whether a string is a logical or not.
- Parameters
-
- Returns
- Logical whether or not the string can be represented as a logical
Definition at line 156 of file conversions.F90.
156 character(len=*),
intent(in) :: string
158 string_is_logical = .false.
159 if (trim(adjustl(string)) .eq.
"true" .or. trim(adjustl(string)) .eq.
"false" .or. &
160 trim(adjustl(string)) .eq.
".true." .or. trim(adjustl(string)) .eq.
".false." .or. &
161 trim(adjustl(string)) .eq.
".true" .or. trim(adjustl(string)) .eq.
"true." .or. &
162 trim(adjustl(string)) .eq.
".false" .or. trim(adjustl(string)) .eq.
"false.") string_is_logical = .true.
The documentation for this interface was generated from the following file:
- /nfs/a277/earlcd/dev/monc/svn-git/monc/model_core/src/utils/conversions.F90