OS_NAME Function

public pure function OS_NAME(os)

Return string describing the OS type flag

Arguments

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

Return Value character(len=:), allocatable


Source Code

    pure function OS_NAME(os)
        integer, intent(in) :: os
        character(len=:), allocatable :: OS_NAME

        select case (os)
            case (OS_LINUX);   OS_NAME =  "Linux"
            case (OS_MACOS);   OS_NAME =  "macOS"
            case (OS_WINDOWS); OS_NAME =  "Windows"
            case (OS_CYGWIN);  OS_NAME =  "Cygwin"
            case (OS_SOLARIS); OS_NAME =  "Solaris"
            case (OS_FREEBSD); OS_NAME =  "FreeBSD"
            case (OS_OPENBSD); OS_NAME =  "OpenBSD"
            case (OS_UNKNOWN); OS_NAME =  "Unknown"
            case default     ; OS_NAME =  "UNKNOWN"
        end select
    end function OS_NAME