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