ALL of the code between your Select..EndSelect section would get compiled into the executable, regardless of which platform it was being compiled on. So if you compiled on a Mac, the code for Windows and Linux would still be there, just never actually used.
Some people, here you are then.
Const Win:Int =0
Const Mac:int = 1
Const Lin:Int = 2
Global Platform:int
?win32
Platform= Win
?macos
Platform=Mac
?linux
Platform=Lin
?
Select Platform
?win32
Case Win
?macos
Case Mac
?linux
Case Lin
?
EndselectI
still think the point was simply to call
the same functions but simply with different parameters depending on which platform you had identified. All he wanted was a way to know which parameters to pass to graphics, not to have a massive code section for each. And the actual question was "How can I tell which platform my game is on?", which was the Platform Global part of my code snippet, the select was just using it. What he wanted to be able to do was write the same code, that simply ran a little bit differently depending on the platform. My snippet seems to have lead you to think he will write diffent code for each platform, where as I was expecting somthing on the lines of
Case win
GoGame(1)
Case Mac
GoGame(2)
etcObviously you or I would simply stick the different code in a ?? section, but the question, and then the implication of its use sudjested a different way whereby there is no "Three different codes for each platform", but rather one code that has knowlage of which platform its on.
But ho um