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 100 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 167 of file conversions.F90.
168 character(len=*),
intent(in) :: string
170 string_is_logical = .false.
171 if (trim(adjustl(string)) .eq.
"true" .or. trim(adjustl(string)) .eq.
"false" .or. &
172 trim(adjustl(string)) .eq.
".true." .or. trim(adjustl(string)) .eq.
".false." .or. &
173 trim(adjustl(string)) .eq.
".true" .or. trim(adjustl(string)) .eq.
"true." .or. &
174 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: