We can write in BASIC:
a = 1+2
a = 1+ 2
a = 1+ _
a = 1 +2
a = 1 + 2
a = 1 _
But for dot expressions:
a = b.c 'OK
a = b. c 'OK
a = b. _
a = b .c 'error !
a = b _
.c 'error !
Is this feature or bug?
(In reply to nvyush from comment #0)
> Is this feature or bug?
Note: in the future, it is best to use http://ask.libreoffice.org/ before filing a report.
(In reply to Buovjaga from comment #1)
> Note: in the future, it is best to use http://ask.libreoffice.org/ before
> filing a report.
I filled out the bugreport, since I think this is a bug. I tried to find an appropriate bugreport, but did not find.
I tried to write this expression:
invokePythonFunction = getMasterScriptProvider() _
.getScript(URL_Main & file & ".py$" & func & URL_Args) _
.invoke(args, outIdxs, outArgs)
but get the error 'BASIC syntax error. Unexpected symbol: ..'
This expression is OK:
invokePythonFunction = getMasterScriptProvider(). _
getScript(URL_Main & file & ".py$" & func & URL_Args). _
invoke(args, outIdxs, outArgs)
but the first one is more readable, IMHO.
PS. This expression is OK also:
sum = summand1 _
+ summand2 _
I confirm this. But I put minor because this problem has easy workaround.
The treatment of "." seems to me inappropriate. The error is thrown at line 460 of the method "parse" in parser.cxx.
if (! IsEos ())
if (! IsEos () && eCurTok! = ELSE)
// If the parsing has-been aborted, jump over to the ""
Error (ERRCODE_BASIC_UNEXPECTED, eCurTok);
eCurTok is "DOT" at the time of the error.
Takeshi Abe committed a patch related to this issue.
It has been pushed to "master":
tdf#103104 Allow line-continuation followed by a dot in BASIC
It will be available in 6.0.0.
The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
Polite ping: is this bug fixed? if so, please close it as RESOLVED FIXED