way to make certain lines not executed on certain platforms.
Posted: Mon Jul 29, 2013 12:12 am
If i correctly remember, you have mentioned that trying to compile for example ChangeMousePointer command to Android would result in error.
Therefore I would be asking that you would add some way to exclude some of the commands in case it is compiled for Android device.
As example, now you are using /* */ for comments, something similar to that could be useful.
And even better you could make it so that instead of having just an option for android and non android devices, you oculd give freedom for programmer to decide which parts are not executed.
For example, it could be that you could use:
1/* */1 , 2/* */2 , 3/* */3
and then the first line of code could tell the compiler which numbers would be executed and which ones left out, it could be for example:
#DONTCOMPILE 1, 2, 3
meaning that it wont compile any of that stuff between 1/* and */1 or between 2/* and */2 or between 3/* and */3
For that could be useful for testing purposes too, to for example bug hunt when you could "comment" and "uncomment" some parts of code back and forth just by putting/removing one number from first line of code.
Or you oculd easily make speedtests upon which way is faster when you could check the difference by just adding/removing one number.
But mainly I would like this feature so that I could be programming in such way that both Android and Computer versions would share same code, and then when there is for example ChangeMousePointer part, I would simply put those lines dealing with that between comments that work in such way that when compiling to andorid it ignores them and when compiling to computers, it would execute them.
Therefore I would be asking that you would add some way to exclude some of the commands in case it is compiled for Android device.
As example, now you are using /* */ for comments, something similar to that could be useful.
And even better you could make it so that instead of having just an option for android and non android devices, you oculd give freedom for programmer to decide which parts are not executed.
For example, it could be that you could use:
1/* */1 , 2/* */2 , 3/* */3
and then the first line of code could tell the compiler which numbers would be executed and which ones left out, it could be for example:
#DONTCOMPILE 1, 2, 3
meaning that it wont compile any of that stuff between 1/* and */1 or between 2/* and */2 or between 3/* and */3
For that could be useful for testing purposes too, to for example bug hunt when you could "comment" and "uncomment" some parts of code back and forth just by putting/removing one number from first line of code.
Or you oculd easily make speedtests upon which way is faster when you could check the difference by just adding/removing one number.
But mainly I would like this feature so that I could be programming in such way that both Android and Computer versions would share same code, and then when there is for example ChangeMousePointer part, I would simply put those lines dealing with that between comments that work in such way that when compiling to andorid it ignores them and when compiling to computers, it would execute them.