trailing semicolon?
#1
I'm sure this has come up before, but probably on the old forum.

In a code module translated from C, I inadvertently left a line-end semicolon behind, resulting in:

Code:
END TYPE;

As far as I'm aware this is not valid, and shouldn't compile - but it did!

What am I getting wrong here? Is is somehow valid PB syntax?
Reply
#2
It is for comment in an Inline Assembler statement. See PB Help - REM statement: 
Syntax
REM comment text
' comment text
; comment in an Inline Assembler statement

Should add - a semi colon alone is ok to set anywhere, but will only work as remark in  Inline Assembler statements.
Reply
#3
Hi Borje,

Thanks for the explanation. So a trailing semicolon is basically ignored everywhere*, but it only treated as a comment marker in Assembler? Seems like a compiler bug to me. 


* it is meaningful in some places, e.g. at the end of a PRINT statement. The inconsistency makes me think this is not intended behaviour.
Reply
#4
Quick test shows it's not ignored everywhere, but doesn't matter what Bob had intention to do with it or if it is a "feature", because there will be no more versions of PB compilers. Apapt, overcome and move on.. Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)