Page 1 of 1

Rule comment error

Posted: Thu Feb 28, 2013 9:30 am
by ioscat
we got error of missing of expected semicolon ";" while writing comments. what is the reason? without comments works fine.

Re: Rule comment error

Posted: Thu Feb 28, 2013 9:33 am
by ioscat
amazing - the reason is tabulation before comments...
so it is solved

Re: Rule comment error

Posted: Thu Feb 28, 2013 12:45 pm
by lotsaram
ioscat wrote:amazing - the reason is tabulation before comments...
so it is solved
... yep, TurboIntegrator is more forgiving and allows spaces and tabs before comments, so long as # is the first "non blank" character on a line it is OK. But with rules the # has to be the first character in order for the line to be evaluated as a comment.

TI is also more forgiving in that it evaluates the end of a line of code only when it encounters a semi-colon, even if visually it wraps to several lines in the editor, but with rules if you have a long comment when the rule is saved lines more than 120 something characters get broken and this can then cause an error as the next line of the comment won't start with #. So the user has to consciously line break comments and prefix each line with # themselves (not such a big issue as almost everyone will do this subconsciously anyway to make comments easily readable). Maybe this has been fixed in recent versions but it was that way in the past, and anyone who has encountered this would be consciously line wrapping comments and so not observe a fix if it was there!

Re: Rule comment error

Posted: Thu Feb 28, 2013 6:36 pm
by Duncan P
Try this one

Code: Select all

[] = N: LONG( '
    # a comment after 4 spaces
' );