Check if os_name is a valid name of a supported OS
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | os_name | Name of an operating system | ||
| logical, | intent(out) | :: | is_valid | Boolean value of whether os_name is valid or not | 
pure elemental subroutine validate_os_name(os_name, is_valid) !> Name of an operating system character(len=*), intent(in) :: os_name !> Boolean value of whether os_name is valid or not logical, intent(out) :: is_valid select case (lower(os_name)) case ("linux", "macos", "windows", "cygwin", "solaris", "freebsd", & & "openbsd", "all") is_valid = .true. case default is_valid = .false. end select end subroutine validate_os_name