Rule comment error

Post Reply
User avatar
ioscat
Regular Participant
Posts: 209
Joined: Tue Jul 10, 2012 8:26 am
OLAP Product: Contributor
Version: 9.5.2 10.1.1 10.2
Excel Version: 07+10+13
Contact:

Rule comment error

Post by ioscat »

we got error of missing of expected semicolon ";" while writing comments. what is the reason? without comments works fine.
Attachments
Без имени.png
Без имени.png (36.63 KiB) Viewed 2605 times
Last edited by ioscat on Thu Feb 28, 2013 9:33 am, edited 1 time in total.
User avatar
ioscat
Regular Participant
Posts: 209
Joined: Tue Jul 10, 2012 8:26 am
OLAP Product: Contributor
Version: 9.5.2 10.1.1 10.2
Excel Version: 07+10+13
Contact:

Re: Rule comment error

Post by ioscat »

amazing - the reason is tabulation before comments...
so it is solved
lotsaram
MVP
Posts: 3706
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Rule comment error

Post 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!
Duncan P
MVP
Posts: 600
Joined: Wed Aug 17, 2011 1:19 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2
Excel Version: 2003 2007
Location: York, UK

Re: Rule comment error

Post by Duncan P »

Try this one

Code: Select all

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