Just making a note to remind myself, and to warn others as much as anything.
There seems to be a difference in the way that '#IfDef' statements are parsed between the Windows PicAxe compiler, and the Mac version.
The following statements compile in Windows as expected:
However, if this is copied into MacAXEpad it the only statement that is compiled is the 'Pause 100' command, giving 5 bytes of code size.
If the above code is rewritten as:
Then the full code is compiled, including the conditional '#Terminal' and 'SerTxd...' commands. Giving 63 bytes of code size.
It could be that there is a bug in the MaxAXEpad compiler, or in the Windows compiler, or perhaps the Windows compiler is turning a blind eye to the erroneous 'Then', but it has taken me an absolute age to work out why programs that worked correctly in Windows, suddenly didn't on my iMac.
If it *shouldn't* compile, is it possible for it to not compile on both, rather than only on one or the other?
There seems to be a difference in the way that '#IfDef' statements are parsed between the Windows PicAxe compiler, and the Mac version.
The following statements compile in Windows as expected:
Code:
#Define Show_Debug
#IfDef Show_Debug Then
#Terminal 4800
#EndIf
Pause 100
#IfDef Show_Debug Then
SerTxd("08M2 DFPlayer controller", CR, LF )
SerTxd("V2.5")
SerTxd( CR, LF )
#EndIf
If the above code is rewritten as:
Code:
#Define Show_Debug
#IfDef Show_Debug
#Terminal 4800
#EndIf
Pause 100
#IfDef Show_Debug
SerTxd("08M2 DFPlayer controller", CR, LF )
SerTxd("V2.5")
SerTxd( CR, LF )
#EndIf
It could be that there is a bug in the MaxAXEpad compiler, or in the Windows compiler, or perhaps the Windows compiler is turning a blind eye to the erroneous 'Then', but it has taken me an absolute age to work out why programs that worked correctly in Windows, suddenly didn't on my iMac.
If it *shouldn't* compile, is it possible for it to not compile on both, rather than only on one or the other?
Last edited: