Conditional compilation?
BlitzMax Forums/BlitzMax Programming/Conditional compilation?
| ||
How can you identify if the code is compiling on a Mac or PC and include different code for each? |
| ||
Im not sure but i think you can do something like?MacOS Print("You are using MacOS!") ? ?Win32 Print("You are using Win32!") ? ?Linux Print("You are using Linux!") ? If you are using MacOS then it will only compile what is between the ?MacOS and ? and same for win32 and Iinux. |
| ||
Or, justPrint "On platform.. " ?MacOS Print "Mac" ' You don't need to add a blank ? per item ?Win32 Print "Win32" ?Linux Print "Linux" ? Print "OMGSUCCESS" But, it would be nicer if you could do stuff like ?Define PREPROCDEF ?PREPROCDEF ? <sarcasm>But then I think simple preprocessing like this is so difficult.</sarcasm> |
| ||
Cheers, fellows. Some preprocessing stuff would be nice, but I won't hold my breath. |