new compiler constant #PB_Compiler_LibrarySubSystem

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

new compiler constant #PB_Compiler_LibrarySubSystem

Post by Demivec »

I request a new compiler constant that will return the Library SubSystem being compiled for, possibly named #PB_Compiler_LibrarySubSystem.

This would be helpful for condition compiling options that depend on the Library being used.
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: new compiler constant #PB_Compiler_LibrarySubSystem

Post by Josh »

Help wrote: Syntax
Result = Subsystem(<constant string expression>)

Description
Subsystem can be used to find out if a subsystem is in use for the program being compiled. The name of the subsystem is case sensitive.

Example

Code: Select all

  CompilerIf Subsystem("OpenGL")
    Debug "Compiling with the OpenGL subsystem"
  CompilerEndIf
A constant is not possible, since theoretically several subsystems can be entered.
sorry for my bad english
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: new compiler constant #PB_Compiler_LibrarySubSystem

Post by Demivec »

Thank you Josh for this information. I am able to code the things I need to now. I had overlooked the fact that more than one subsystem could be used.

Since my expressed need is already met by the method you shared I naturally withdraw my feature request.
Post Reply