os_is_unix Function

public function os_is_unix(os)

Compare the output of get_os_type or the optional passed INTEGER value to the value for OS_WINDOWS and return .TRUE. if they match and .FALSE. otherwise


Type IntentOptional Attributes Name
integer, intent(in), optional :: os

Return Value logical


Source Code

Source Code

    logical function os_is_unix(os)
        integer, intent(in), optional :: os
        integer :: build_os
        if (present(os)) then
            build_os = os
            build_os = get_os_type()
        end if
        os_is_unix = build_os /= OS_WINDOWS
    end function os_is_unix