Syntax error, but code is old

xzoqick

New Member
In the following code I have a syntax error on both readadc10 lines. A friend confirms the same for him.

Code:
#picaxe08m

Start:
SYMBOL WSpeed = W3
SYMBOL RPM = W2
SYMBOL Amp = W1
SYMBOL Volt = W0

Main:
readadc10 4,Volt*
readadc10 1, Amp*
Count 3, 1000, RPM
Count 2, 1000, WSpeed
sertxd("[<V>", #volt, "</V><I>", #Amp, "</I><R>", #RPM, "</R><S>", #WSpeed, "</S>]") 
goto main
The message states: illegal character: ((0xFFFFFFA0))

This code has been used for years and I can't find error with it.

I am using Programming Editor ver 5.2.0 syntax DLL 262144

Any suggestions?
 

kranenborg

Senior Member
Hello,

In the readadc statements a * has been added after the variable names (Volt*, Amp*) which is clearly incorrect. Remove them and you will see that the code compiles correctly.

Regards,

Jurjen
 
Last edited:

xzoqick

New Member
Solved

Seems I've resolved the error by noting an invisible character added to the end of the two lines in question when I posted the code here.

These extra characters are not visible in Programming Editor. I deleted the blank space after the variable at the end of the line, then syntax is OK.

MOST ODD!

Whats the go with this?
 

Texy

Senior Member
The 'go' is to not use illegal characters in variable names, as the syntax error told you:rolleyes:
Where did the basic program come from?

Texy
 

hippy

Technical Support
Staff member
I downloaded the .zip and got the same problem. I cannot think of any easy way to avoid them, even Notepad doesn't show them, another command line text editor does. How they got in there is a mystery and numerous ways for that to have happened.

Anyone producing a .zip file should extract the contents, and check that what is there is what is meant to be and it works. This should have been caught by a compilation before release but wasn't.
 

xzoqick

New Member
OK, It seems like one of those unexplainable occurances. It was only posting the code to this thread that revealed it to me. I'll get on to that site owner and advise him of the problem (he's a mate) so no worries there. But first I'll take a copy of it for evidence when I relate the story later.

Thanks to all who replied.
 
Top