Code: Select all
CompilerIf #PB_Compiler_OS=#PB_OS_Windows Or #PB_Compiler_OS=#PB_OS_Linux
Code: Select all
CompilerIf #PB_Compiler_OS=#PB_OS_Windows Or #PB_Compiler_OS=#PB_OS_Linux
Code: Select all
#Any_OS = 1 ; Any OS
#Ami_only = #PB_Compiler_OS = #PB_OS_AmigaOS ; Amiga only
#Lin_Only = #PB_Compiler_OS = #PB_OS_Linux ; Linux only
#Win_Only = #PB_Compiler_OS = #PB_OS_Windows ; Windows only
#Lin_Or_Win = #Lin_Only + #Win_Only ; Linux or Windows but not Amiga
#Ami_Or_Win = #Ami_only + #Win_Only ; Amiga or Windows but not Linux
#Ami_Or_Lin = #Ami_only + #Lin_Only ; Amiga or Linux but not Windows
OpenConsole( )
CompilerIf #Any_OS
PrintN( "Any OS" )
CompilerEndIf
CompilerIf #Ami_only
PrintN( "Amiga OS" )
CompilerElse
PrintN( "Not Amiga OS !!!" )
CompilerEndIf
CompilerIf #Lin_only
PrintN( "Linux" )
CompilerElse
PrintN( "Not Linux !!!" )
CompilerEndIf
CompilerIf #Win_only
PrintN( "Windows" )
CompilerElse
PrintN( "Not Windows !!!" )
CompilerEndIf
CompilerIf #Ami_Or_Win
PrintN( "Amiga OS or Windows" )
CompilerElse
PrintN( "Linux" )
CompilerEndIf
CompilerIf #Lin_Or_Win
PrintN( "Linux or Windows" )
CompilerElse
PrintN( "Amiga OS" )
CompilerEndIf
CompilerIf #Ami_Or_Lin
PrintN( "Amiga OS or Linux" )
CompilerElse
PrintN( "Windows" )
CompilerEndIf
Input( )
CloseConsole( )