#rem / #endrem doesn't work with data statements.

AndyGadget

Senior Member
Is this a known bug? Will explore and post more details if not.

Using single quote at start of each data statement of a block works fine.
Using #rem and #endrem (in lower case) to ignore block of data causes syntax errors further down program.

Using PE 5.5.5.

*** FINAL EDIT ***
If I pass the original code through a forum post and reload into PE it passes syntax checking so unable to confirm the problem - Possibly related to a spurious invisible character? Anyway, PE6 is on the way so it'll soon be irrelevant :)
 
Last edited:

westaust55

Moderator
Not aware of that - but then I do not generally use #rem and #endrem


Why not use the directive
#no-data
When not wanting to download the content of DATA (or EEPROM) statements

or are you trying to select between different sets of DATA Statements?
in which case maybe trying the
#ifdef / #ifndef label
#else
#endif
directive structure may help
 

AndyGadget

Senior Member
Very minimal code below. Removing or moving any of the elements and it will pass checking.
The important aspect appears to be a #rem/#endrem data statement before the symbol assignment and a 2nd #rem/#endrem afterwards.

*** EDIT - I've just copied and pasted the code below into a new PE window and it passes syntax check so looks like it may have been a one-off strangeness ***

*** EDIT 2 - . . . but doing that with the full code still gives the error. Will investigate further later. ***

Code:
#picaxe 28x2

#rem
data 0,($00)
#endrem

symbol Var1	= b0

#rem
#endrem

var1 = 5
 

DamonHD

Senior Member
Are you working on a Mac? The different line-endings (CR only) seem to confuse or even crash the PICAXE tools on occasion.

Laundering code though this site may fix the line-endings.

Rgds

Damon
 

AndyGadget

Senior Member
No, it's a Windows PC. Looks like it was a one-off though as I haven't been able to replicate it.
I've seen mention of similar things happening before on the forum.
 

westaust55

Moderator
No, it's a Windows PC. Looks like it was a one-off though as I haven't been able to replicate it.
I've seen mention of similar things happening before on the forum.
I think you may find past references to problems with #rem and #endrem related to incorrect coloration of subsequent code within the PE window unless capitals were used - this was fixed at V5.2.0 of the PE.
 
Last edited:

AndyGadget

Senior Member
I think you may find past references to problems with #rem and #endrem related to incorrect coloration of subsequent code within the PE window unless capitals were used - this was fixed at V5.2.0 of the PE.
I was referring more to the spurious character, although I can't see quite how that would create the effect I was seeing. However the passing of the code through a 'dumb' editor would suggest an issue of that sort. I've had no further problems with the 'cleaned' code so quite content to treat it as a glitch.
 

westaust55

Moderator
I was referring more to the spurious character, although I can't see quite how that would create the effect I was seeing. However the passing of the code through a 'dumb' editor would suggest an issue of that sort. I've had no further problems with the 'cleaned' code so quite content to treat it as a glitch.
If as you subsequently suggested, there was a non displaying character (some control code do no show up on the display) then the PE can "see" the character in the BASIC text file and cannot make sense of it therefore indicating an error.
I missed the fact that you had added extra information at post 1 a day and several posts later.

As a suggestion for the future, indicating the exact error message text you see can sometimes be helpful for others to work out what may be wrong.
 
Top