danners430
Member
I've just discovered a strange oddity - I can't seem to use the colon (
The following doesn't work:
While the following does:
In addition, the following doesn't work:
but does if I remove the comment.
Finally, having
The errors are as follows:
It would appear, in other words, that pre-processor directives don't recognise the colon or comment symbols (
:
) to merge multiple lines of code into one, curly brackets to "group" pieces of code in the editor, or use comments on the same line when using preprocessor directives.The following doesn't work:
Code:
#IF number > 1: put var1 + 4, 150 :#ENDIF
Code:
#IF number > 1
put var1 + 4, 150
#ENDIF
Code:
#DEFINE number 8 'Number of LDRs connected (starts at 1)
Finally, having
{#IF
generates an error where the pre-processor cannot find the #IF's corresponding #ENDIF. You have to move the brackets to another line to clear the error. Confusinly, this does not apply when you have #ENDIF}
...The errors are as follows:
Code:
#IF number > 1
^
Syntax error on line 75 at position 1
Error: 8 ;Number of LDRs connected (starts at 1) is not a numeric value, try #IFDEF instead of #IF?
Code:
#IF number > 1: put var1 + 4, 150 :#ENDIF
^
Syntax error on line 79 at position 1
Error: put var1 + 4, 150 :#ENDIF is not a numeric value.
'
/ ;
/ REM
) in the same way the compiler does - this isn't a problem for me, per se, as I've already found the solutions, but I couldn't find this listed anywhere in the documentation after a quick search. So hopefully this post will be of some help to someone in the future.