What Does "?" mean?

BlitzMax Forums/BlitzMax Beginners Area/What Does "?" mean?

BLaBZ(Posted 2009) [#1]
What does "?" mean in this piece of code?

' set graphics driver
?Win32
Framework BRL.D3D7Max2D
?Linux
Framework BRL.GLMax2D
?MacOS
Framework BRL.GLMax2D
?


I believe what's happening is depending on the users OS, a different graphic driver is being used.
What other ways can you use "?"


Brucey(Posted 2009) [#2]
Compiler directives.

See in the IDE documentation :

Help -> Language -> Conditional Compiling


:-)


ImaginaryHuman(Posted 2009) [#3]
It's like an `IF`, but it's tested when your program is compiled, not when it runs. So like ?Win32 means "If the computer you're running this program on is running the Windows operating system, then...." and then it'll do whatever code your program has from that line down to either another ? like ?Linux ?MacOS ?PPC ?Intel ?LittleEndian ?BigEndian etc or `EndIF` by using a single ?

It lets you have different chunks of code be `used` depending on what hardware you are running on. It's kind of like a Select..Case based on what hardware is available.


jsp(Posted 2009) [#4]
But not only hardware related, we have also:
?Debug
'compile in debug mode only
?Not Debug
'compile in not debug mode
?


Arowx(Posted 2009) [#5]
Hmm is it possible to use or set identifiers like params in c, it would just be handy for ...

? Development

? Demo

ect?