You are viewing a plain text version of this content. The canonical link for it is here.
Posted to qa@openoffice.apache.org by Lucien Mathay <MA...@live.fr> on 2022/06/06 08:42:50 UTC
Bug report : comment after "if ... then ... else"
Hello,
I would like to report the following bug : in the macros when a line
containing "if ... then ... else" is followed by a comment on the same
line, the compiler fails.
Example :
Function test()
dim a as long, b as long
a=0: b=0
if a = b then a=1 else a=2 'test
b=1
call msgbox b
End Function
The presence or not of the comment " 'test " at the end of the line
changes the result displayed :
>When the comment is present on the line, the message displays the
result "*b=0*", which is wrong
>When the comment is omitted, the message displays the result "*b=1*",
which is correct
The error thus comes from the fact that *when this comment is present,
the program ignores the next line*.
You can confirm this again by placing the line with this comment just
before the line "End Function" : the compiler will report "End Function
is missing" !
Thank you all !
Lucien.
Re: Bug report : comment after "if ... then ... else"
Posted by Czesław Wolański <cz...@gmail.com>.
Hi,
Regina Henschel schrieb am 06.06.2022 um 13:33
>
>The if-statement misses endif.
>
Right.
As I am slightly out of practice with Basic, my question might appear silly.
The wiki topic "Branching" provides an example of a single-line
If-Then-Else statement.
https://wiki.openoffice.org/wiki/Documentation/BASIC_Guide/Branching
Does it apply to Lucien's macro?
Besides, the macro in version 4.2.0-dev always displays the value "1".
Best regards,
Czesław
Re: Bug report : comment after "if ... then ... else"
Posted by Regina Henschel <rb...@t-online.de>.
Hi Lucien,
Lucien Mathay schrieb am 06.06.2022 um 18:51:
> Thank you Regina, but
>
> if I add an 'endif' at the end of the line
> ( " if a = b then a=1 Else a=2 endif 'test "),
> the compiler fails with the message "Syntax error : unexpectes symbol :
> End If".
Indeed, endif is only possible in case if-then, else, endif are on own
lines.
The part 'test is interpreted as
:Rem test
So the comment belongs to the else-Block.
The problem is, that AOO does not end the if-statement with end of the line.
LibreOffice has a different behavior.
>
> Therefore I still consider this as a bug.
You can write an issue on https://bz.apache.org/ooo/.
Kind regards
Regina
---------------------------------------------------------------------
To unsubscribe, e-mail: qa-unsubscribe@openoffice.apache.org
For additional commands, e-mail: qa-help@openoffice.apache.org
Re: Bug report : comment after "if ... then ... else"
Posted by Carl Marcum <cm...@apache.org>.
Hi Lucien,
On 6/16/22 4:36 AM, Lucien Mathay wrote:
> Thanks Mathias for introducing this part of the team ; I will also
> introduce myself : I am the developer of a program in VB, and I now
> start to translate it into Basic.
>
> It has some complexity. You might hear more from me in the future if
> I discover other strange things.
Welcome and thanks again for the contribution!
Good luck on your application.
Best regards,
Carl
>
> Best regards, Lucien.
>
> Le 15/06/22 à 16:57, Matthias Seidel a écrit :
>> Hi Lucien,
>>
>> I only did provide the build. Carl found the fix and backported it...
>>
>> Thanks Carl for finding it and Damjan for fixing it in the first
>> place! ;-)
>>
>> Regards,
>>
>> Matthias
>>
>>> Le 14/06/22 à 16:52, Matthias Seidel a écrit :
>>>> Hi Lucien,
>>>>
>>>> Please find my latest builds for Windows here:
>>>>
>>>> https://home.apache.org/~mseidel/AOO-builds/AOO-4113-Test/Full%20Installation/
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Matthias
>>>>
>>>> Am 13.06.22 um 19:05 schrieb Matthias Seidel:
>>>>> Hi Lucien,
>>>>>
>>>>> Am 13.06.22 um 18:23 schrieb Lucien Mathay:
>>>>>> Hi Mathias,
>>>>>>
>>>>>> yes, I can test it out with pleasure.
>>>>> Great!
>>>>>> I use Windows XP. It's the easiest for me, but I can also have
>>>>>> access to a Windows 10.
>>>>> Windows XP *should* work. Try that and if you find the time test
>>>>> on Win
>>>>> 10...
>>>>>
>>>>> I will start a new build now and will come back when finished and
>>>>> uploaded.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Matthias
>>>>>
>>>>>> Regards,
>>>>>> Lucien.
>>>>>>
>>>>>> Le 11/06/22 à 16:51, Matthias Seidel a écrit :
>>>>>>> Hi Carl,
>>>>>>>
>>>>>>> Now that the fix is in AOO41X I will prepare a new build (for
>>>>>>> Windows).
>>>>>>>
>>>>>>> Maybe Lucien can test/confirm the issue is solved?
>>>>>>>
>>>>>>> @Lucien: What OS do you use?
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> Matthias
>>>>>>>
>>>>>>> Am 07.06.22 um 23:23 schrieb Carl Marcum:
>>>>>>>> Hi Matthias,
>>>>>>>>
>>>>>>>> On 6/7/22 6:53 AM, Matthias Seidel wrote:
>>>>>>>>> Hi Carl,
>>>>>>>>>
>>>>>>>>> Am 07.06.22 um 00:59 schrieb Carl Marcum:
>>>>>>>>>> Hi Lucien,
>>>>>>>>>>
>>>>>>>>>> On 6/6/22 12:51 PM, Lucien Mathay wrote:
>>>>>>>>>>> Thank you Regina, but
>>>>>>>>>>>
>>>>>>>>>>> if I add an 'endif' at the end of the line
>>>>>>>>>>> ( " if a = b then a=1 Else a=2 endif 'test "),
>>>>>>>>>>> the compiler fails with the message "Syntax error : unexpectes
>>>>>>>>>>> symbol
>>>>>>>>>>> : End If".
>>>>>>>>>>>
>>>>>>>>>>> Furthermore, the book from "OpenOffice .org Macros
>>>>>>>>>>> OoOffice et
>>>>>>>>>>> Apis" from Bernard Marcelly and Laurent Goddard states p.118 :
>>>>>>>>>>>
>>>>>>>>>>> "Lorsqu’une seule instruction suffit dans la partie Then et
>>>>>>>>>>> dans la
>>>>>>>>>>> partie Else, la séquence peut s’écrire sur une seule ligne :
>>>>>>>>>>> If expr1 Then instruction1v Else instruction1f
>>>>>>>>>>> Notez l’absence du End If dans cette forme simplifiée."
>>>>>>>>>>> which means, translated :
>>>>>>>>>>>
>>>>>>>>>>> "When only one instruction is used in the section Then and
>>>>>>>>>>> in the
>>>>>>>>>>> section Else, the sequence can be written on one single line :
>>>>>>>>>>> If expr1 Then instruction1v Else instruction1f
>>>>>>>>>>> Please note the absence of End If in this simplified
>>>>>>>>>>> usage"
>>>>>>>>>>>
>>>>>>>>>>> Therefore I still consider this as a bug.
>>>>>>>>>> I believe you are correct.
>>>>>>>>>>
>>>>>>>>>> In my recent work on making the trunk test suites standalone to
>>>>>>>>>> run
>>>>>>>>>> against other branches like AOO41X I discovered some other bug
>>>>>>>>>> fixes
>>>>>>>>>> that were applied to trunk and AOO42X but never back ported to
>>>>>>>>>> AOO41X.
>>>>>>>>>>
>>>>>>>>>> Two examples I put in a PR-150 [1]. One of which related to
>>>>>>>>>> variable
>>>>>>>>>> names in single-line if statements.
>>>>>>>>>> I tested your example against that build but it isn't fixed by
>>>>>>>>>> it but
>>>>>>>>>> I believe I found the patch that fixed your bug in trunk [2].
>>>>>>>>>> Issue 126272 [3] is listed in Bugzilla with a target
>>>>>>>>>> milestone of
>>>>>>>>>> 4.2.
>>>>>>>>>> I think this needs a more general discussion on dev@ about how
>>>>>>>>>> much we
>>>>>>>>>> should change API's in 4.1.X.
>>>>>>>>>> Which I intended to do anyway before merging my PR-150.
>>>>>>>>>>
>>>>>>>>>> Thanks for pointing this out!
>>>>>>>>>>
>>>>>>>>>> [1]https://github.com/apache/openoffice/pull/150
>>>>>>>>>> [2]
>>>>>>>>>> https://github.com/apache/openoffice/commit/07396187f6055b1e7cffa86f38cc88b274dfb1d6
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> [3]https://bz.apache.org/ooo/show_bug.cgi?id=126272
>>>>>>>>> I think this fix [2] should be cherry-picked to AOO41X.
>>>>>>>>>
>>>>>>>>> BTW: The target milestone 4.2.0 was trunk at that time. Later we
>>>>>>>>> made
>>>>>>>>> trunk 4.5.0 and branched 4.2.0, but the milestones were not
>>>>>>>>> updated.
>>>>>>>> Yes, I just want to make sure it wasn't intentional to leave this
>>>>>>>> one
>>>>>>>> and a few other changes the the Basic macros out of the 4.1
>>>>>>>> line due
>>>>>>>> to not wanting to change API or code behavior.
>>>>>>>> I will create a PR for it or maybe just add it to the other one
>>>>>>>> I've
>>>>>>>> got open since they are all small and bring a discussion on dev@.
>>>>>>>>
>>>>>>>> Then if we agree it's okay I'll pull them in.
>>>>>>>>
>>>>>>>> Best regards,
>>>>>>>> Carl
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>> Matthias
>>>>>>>>>
>>>>>>>>>> Best regards,
>>>>>>>>>> Carl
>>>>>>>>>>> With kind regards,
>>>>>>>>>>> Lucien
>>>>>>>>>>>
>>>>>>>>>>> Le 6/06/22 à 13:32, Regina Henschel a écrit :
>>>>>>>>>>>> Hi Lucien,
>>>>>>>>>>>>
>>>>>>>>>>>> Lucien Mathay schrieb am 06.06.2022 um 10:42:
>>>>>>>>>>>>> Hello,
>>>>>>>>>>>>>
>>>>>>>>>>>>> I would like to report the following bug : in the macros
>>>>>>>>>>>>> when a
>>>>>>>>>>>>> line containing "if ... then ... else" is followed by a
>>>>>>>>>>>>> comment on
>>>>>>>>>>>>> the same line, the compiler fails.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Example :
>>>>>>>>>>>>>
>>>>>>>>>>>>> Function test()
>>>>>>>>>>>>> dim a as long, b as long
>>>>>>>>>>>>> a=0: b=0
>>>>>>>>>>>>> if a = b then a=1 else a=2 'test
>>>>>>>>>>>>> b=1
>>>>>>>>>>>>> call msgbox b
>>>>>>>>>>>>> End Function
>>>>>>>>>>>> The if-statement misses endif.
>>>>>>>>>>>>
>>>>>>>>>>>> Kind regards,
>>>>>>>>>>>> Regina
>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> To unsubscribe,e-mail:qa-unsubscribe@openoffice.apache.org
>>>>>>>>>> For additional commands,e-mail:qa-help@openoffice.apache.org
>>>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>
>>>>>>>>
>>>>>>>> To unsubscribe,e-mail:qa-unsubscribe@openoffice.apache.org
>>>>>>>> For additional commands,e-mail:qa-help@openoffice.apache.org
>>>>>>>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: qa-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: qa-help@openoffice.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: qa-unsubscribe@openoffice.apache.org
For additional commands, e-mail: qa-help@openoffice.apache.org
Re: Bug report : comment after "if ... then ... else"
Posted by Lucien Mathay <MA...@live.fr>.
Thanks Mathias for introducing this part of the team ; I will also
introduce myself : I am the developer of a program in VB, and I now
start to translate it into Basic.
It has some complexity. You might hear more from me in the future if I
discover other strange things.
Best regards, Lucien.
Le 15/06/22 à 16:57, Matthias Seidel a écrit :
> Hi Lucien,
>
> I only did provide the build. Carl found the fix and backported it...
>
> Thanks Carl for finding it and Damjan for fixing it in the first place! ;-)
>
> Regards,
>
> Matthias
>
>> Le 14/06/22 à 16:52, Matthias Seidel a écrit :
>>> Hi Lucien,
>>>
>>> Please find my latest builds for Windows here:
>>>
>>> https://home.apache.org/~mseidel/AOO-builds/AOO-4113-Test/Full%20Installation/
>>>
>>>
>>> Regards,
>>>
>>> Matthias
>>>
>>> Am 13.06.22 um 19:05 schrieb Matthias Seidel:
>>>> Hi Lucien,
>>>>
>>>> Am 13.06.22 um 18:23 schrieb Lucien Mathay:
>>>>> Hi Mathias,
>>>>>
>>>>> yes, I can test it out with pleasure.
>>>> Great!
>>>>> I use Windows XP. It's the easiest for me, but I can also have
>>>>> access to a Windows 10.
>>>> Windows XP *should* work. Try that and if you find the time test on Win
>>>> 10...
>>>>
>>>> I will start a new build now and will come back when finished and
>>>> uploaded.
>>>>
>>>> Regards,
>>>>
>>>> Matthias
>>>>
>>>>> Regards,
>>>>> Lucien.
>>>>>
>>>>> Le 11/06/22 à 16:51, Matthias Seidel a écrit :
>>>>>> Hi Carl,
>>>>>>
>>>>>> Now that the fix is in AOO41X I will prepare a new build (for
>>>>>> Windows).
>>>>>>
>>>>>> Maybe Lucien can test/confirm the issue is solved?
>>>>>>
>>>>>> @Lucien: What OS do you use?
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Matthias
>>>>>>
>>>>>> Am 07.06.22 um 23:23 schrieb Carl Marcum:
>>>>>>> Hi Matthias,
>>>>>>>
>>>>>>> On 6/7/22 6:53 AM, Matthias Seidel wrote:
>>>>>>>> Hi Carl,
>>>>>>>>
>>>>>>>> Am 07.06.22 um 00:59 schrieb Carl Marcum:
>>>>>>>>> Hi Lucien,
>>>>>>>>>
>>>>>>>>> On 6/6/22 12:51 PM, Lucien Mathay wrote:
>>>>>>>>>> Thank you Regina, but
>>>>>>>>>>
>>>>>>>>>> if I add an 'endif' at the end of the line
>>>>>>>>>> ( " if a = b then a=1 Else a=2 endif 'test "),
>>>>>>>>>> the compiler fails with the message "Syntax error : unexpectes
>>>>>>>>>> symbol
>>>>>>>>>> : End If".
>>>>>>>>>>
>>>>>>>>>> Furthermore, the book from "OpenOffice .org Macros
>>>>>>>>>> OoOffice et
>>>>>>>>>> Apis" from Bernard Marcelly and Laurent Goddard states p.118 :
>>>>>>>>>>
>>>>>>>>>> "Lorsqu’une seule instruction suffit dans la partie Then et
>>>>>>>>>> dans la
>>>>>>>>>> partie Else, la séquence peut s’écrire sur une seule ligne :
>>>>>>>>>> If expr1 Then instruction1v Else instruction1f
>>>>>>>>>> Notez l’absence du End If dans cette forme simplifiée."
>>>>>>>>>> which means, translated :
>>>>>>>>>>
>>>>>>>>>> "When only one instruction is used in the section Then and in the
>>>>>>>>>> section Else, the sequence can be written on one single line :
>>>>>>>>>> If expr1 Then instruction1v Else instruction1f
>>>>>>>>>> Please note the absence of End If in this simplified usage"
>>>>>>>>>>
>>>>>>>>>> Therefore I still consider this as a bug.
>>>>>>>>> I believe you are correct.
>>>>>>>>>
>>>>>>>>> In my recent work on making the trunk test suites standalone to
>>>>>>>>> run
>>>>>>>>> against other branches like AOO41X I discovered some other bug
>>>>>>>>> fixes
>>>>>>>>> that were applied to trunk and AOO42X but never back ported to
>>>>>>>>> AOO41X.
>>>>>>>>>
>>>>>>>>> Two examples I put in a PR-150 [1]. One of which related to
>>>>>>>>> variable
>>>>>>>>> names in single-line if statements.
>>>>>>>>> I tested your example against that build but it isn't fixed by
>>>>>>>>> it but
>>>>>>>>> I believe I found the patch that fixed your bug in trunk [2].
>>>>>>>>> Issue 126272 [3] is listed in Bugzilla with a target milestone of
>>>>>>>>> 4.2.
>>>>>>>>> I think this needs a more general discussion on dev@ about how
>>>>>>>>> much we
>>>>>>>>> should change API's in 4.1.X.
>>>>>>>>> Which I intended to do anyway before merging my PR-150.
>>>>>>>>>
>>>>>>>>> Thanks for pointing this out!
>>>>>>>>>
>>>>>>>>> [1]https://github.com/apache/openoffice/pull/150
>>>>>>>>> [2]
>>>>>>>>> https://github.com/apache/openoffice/commit/07396187f6055b1e7cffa86f38cc88b274dfb1d6
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> [3]https://bz.apache.org/ooo/show_bug.cgi?id=126272
>>>>>>>> I think this fix [2] should be cherry-picked to AOO41X.
>>>>>>>>
>>>>>>>> BTW: The target milestone 4.2.0 was trunk at that time. Later we
>>>>>>>> made
>>>>>>>> trunk 4.5.0 and branched 4.2.0, but the milestones were not
>>>>>>>> updated.
>>>>>>> Yes, I just want to make sure it wasn't intentional to leave this
>>>>>>> one
>>>>>>> and a few other changes the the Basic macros out of the 4.1 line due
>>>>>>> to not wanting to change API or code behavior.
>>>>>>> I will create a PR for it or maybe just add it to the other one I've
>>>>>>> got open since they are all small and bring a discussion on dev@.
>>>>>>>
>>>>>>> Then if we agree it's okay I'll pull them in.
>>>>>>>
>>>>>>> Best regards,
>>>>>>> Carl
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>> Matthias
>>>>>>>>
>>>>>>>>> Best regards,
>>>>>>>>> Carl
>>>>>>>>>> With kind regards,
>>>>>>>>>> Lucien
>>>>>>>>>>
>>>>>>>>>> Le 6/06/22 à 13:32, Regina Henschel a écrit :
>>>>>>>>>>> Hi Lucien,
>>>>>>>>>>>
>>>>>>>>>>> Lucien Mathay schrieb am 06.06.2022 um 10:42:
>>>>>>>>>>>> Hello,
>>>>>>>>>>>>
>>>>>>>>>>>> I would like to report the following bug : in the macros when a
>>>>>>>>>>>> line containing "if ... then ... else" is followed by a
>>>>>>>>>>>> comment on
>>>>>>>>>>>> the same line, the compiler fails.
>>>>>>>>>>>>
>>>>>>>>>>>> Example :
>>>>>>>>>>>>
>>>>>>>>>>>> Function test()
>>>>>>>>>>>> dim a as long, b as long
>>>>>>>>>>>> a=0: b=0
>>>>>>>>>>>> if a = b then a=1 else a=2 'test
>>>>>>>>>>>> b=1
>>>>>>>>>>>> call msgbox b
>>>>>>>>>>>> End Function
>>>>>>>>>>> The if-statement misses endif.
>>>>>>>>>>>
>>>>>>>>>>> Kind regards,
>>>>>>>>>>> Regina
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>
>>>>>>>>> To unsubscribe,e-mail:qa-unsubscribe@openoffice.apache.org
>>>>>>>>> For additional commands,e-mail:qa-help@openoffice.apache.org
>>>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>>
>>>>>>> To unsubscribe,e-mail:qa-unsubscribe@openoffice.apache.org
>>>>>>> For additional commands,e-mail:qa-help@openoffice.apache.org
>>>>>>>
---------------------------------------------------------------------
To unsubscribe, e-mail: qa-unsubscribe@openoffice.apache.org
For additional commands, e-mail: qa-help@openoffice.apache.org
Re: Bug report : comment after "if ... then ... else"
Posted by Matthias Seidel <ma...@hamburg.de>.
Hi Lucien,
Am 15.06.22 um 09:11 schrieb Lucien Mathay:
> This bug is now fixed.
Great! Thanks for the confirmation.
>
> Thanks Matthias.
I only did provide the build. Carl found the fix and backported it...
Thanks Carl for finding it and Damjan for fixing it in the first place! ;-)
Regards,
Matthias
>
> Le 14/06/22 à 16:52, Matthias Seidel a écrit :
>> Hi Lucien,
>>
>> Please find my latest builds for Windows here:
>>
>> https://home.apache.org/~mseidel/AOO-builds/AOO-4113-Test/Full%20Installation/
>>
>>
>> Regards,
>>
>> Matthias
>>
>> Am 13.06.22 um 19:05 schrieb Matthias Seidel:
>>> Hi Lucien,
>>>
>>> Am 13.06.22 um 18:23 schrieb Lucien Mathay:
>>>> Hi Mathias,
>>>>
>>>> yes, I can test it out with pleasure.
>>> Great!
>>>> I use Windows XP. It's the easiest for me, but I can also have
>>>> access to a Windows 10.
>>> Windows XP *should* work. Try that and if you find the time test on Win
>>> 10...
>>>
>>> I will start a new build now and will come back when finished and
>>> uploaded.
>>>
>>> Regards,
>>>
>>> Matthias
>>>
>>>> Regards,
>>>> Lucien.
>>>>
>>>> Le 11/06/22 à 16:51, Matthias Seidel a écrit :
>>>>> Hi Carl,
>>>>>
>>>>> Now that the fix is in AOO41X I will prepare a new build (for
>>>>> Windows).
>>>>>
>>>>> Maybe Lucien can test/confirm the issue is solved?
>>>>>
>>>>> @Lucien: What OS do you use?
>>>>>
>>>>> Regards,
>>>>>
>>>>> Matthias
>>>>>
>>>>> Am 07.06.22 um 23:23 schrieb Carl Marcum:
>>>>>> Hi Matthias,
>>>>>>
>>>>>> On 6/7/22 6:53 AM, Matthias Seidel wrote:
>>>>>>> Hi Carl,
>>>>>>>
>>>>>>> Am 07.06.22 um 00:59 schrieb Carl Marcum:
>>>>>>>> Hi Lucien,
>>>>>>>>
>>>>>>>> On 6/6/22 12:51 PM, Lucien Mathay wrote:
>>>>>>>>> Thank you Regina, but
>>>>>>>>>
>>>>>>>>> if I add an 'endif' at the end of the line
>>>>>>>>> ( " if a = b then a=1 Else a=2 endif 'test "),
>>>>>>>>> the compiler fails with the message "Syntax error : unexpectes
>>>>>>>>> symbol
>>>>>>>>> : End If".
>>>>>>>>>
>>>>>>>>> Furthermore, the book from "OpenOffice .org Macros
>>>>>>>>> OoOffice et
>>>>>>>>> Apis" from Bernard Marcelly and Laurent Goddard states p.118 :
>>>>>>>>>
>>>>>>>>> "Lorsqu’une seule instruction suffit dans la partie Then et
>>>>>>>>> dans la
>>>>>>>>> partie Else, la séquence peut s’écrire sur une seule ligne :
>>>>>>>>> If expr1 Then instruction1v Else instruction1f
>>>>>>>>> Notez l’absence du End If dans cette forme simplifiée."
>>>>>>>>> which means, translated :
>>>>>>>>>
>>>>>>>>> "When only one instruction is used in the section Then and in the
>>>>>>>>> section Else, the sequence can be written on one single line :
>>>>>>>>> If expr1 Then instruction1v Else instruction1f
>>>>>>>>> Please note the absence of End If in this simplified usage"
>>>>>>>>>
>>>>>>>>> Therefore I still consider this as a bug.
>>>>>>>> I believe you are correct.
>>>>>>>>
>>>>>>>> In my recent work on making the trunk test suites standalone to
>>>>>>>> run
>>>>>>>> against other branches like AOO41X I discovered some other bug
>>>>>>>> fixes
>>>>>>>> that were applied to trunk and AOO42X but never back ported to
>>>>>>>> AOO41X.
>>>>>>>>
>>>>>>>> Two examples I put in a PR-150 [1]. One of which related to
>>>>>>>> variable
>>>>>>>> names in single-line if statements.
>>>>>>>> I tested your example against that build but it isn't fixed by
>>>>>>>> it but
>>>>>>>> I believe I found the patch that fixed your bug in trunk [2].
>>>>>>>> Issue 126272 [3] is listed in Bugzilla with a target milestone of
>>>>>>>> 4.2.
>>>>>>>> I think this needs a more general discussion on dev@ about how
>>>>>>>> much we
>>>>>>>> should change API's in 4.1.X.
>>>>>>>> Which I intended to do anyway before merging my PR-150.
>>>>>>>>
>>>>>>>> Thanks for pointing this out!
>>>>>>>>
>>>>>>>> [1]https://github.com/apache/openoffice/pull/150
>>>>>>>> [2]
>>>>>>>> https://github.com/apache/openoffice/commit/07396187f6055b1e7cffa86f38cc88b274dfb1d6
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> [3]https://bz.apache.org/ooo/show_bug.cgi?id=126272
>>>>>>> I think this fix [2] should be cherry-picked to AOO41X.
>>>>>>>
>>>>>>> BTW: The target milestone 4.2.0 was trunk at that time. Later we
>>>>>>> made
>>>>>>> trunk 4.5.0 and branched 4.2.0, but the milestones were not
>>>>>>> updated.
>>>>>> Yes, I just want to make sure it wasn't intentional to leave this
>>>>>> one
>>>>>> and a few other changes the the Basic macros out of the 4.1 line due
>>>>>> to not wanting to change API or code behavior.
>>>>>> I will create a PR for it or maybe just add it to the other one I've
>>>>>> got open since they are all small and bring a discussion on dev@.
>>>>>>
>>>>>> Then if we agree it's okay I'll pull them in.
>>>>>>
>>>>>> Best regards,
>>>>>> Carl
>>>>>>> Regards,
>>>>>>>
>>>>>>> Matthias
>>>>>>>
>>>>>>>> Best regards,
>>>>>>>> Carl
>>>>>>>>> With kind regards,
>>>>>>>>> Lucien
>>>>>>>>>
>>>>>>>>> Le 6/06/22 à 13:32, Regina Henschel a écrit :
>>>>>>>>>> Hi Lucien,
>>>>>>>>>>
>>>>>>>>>> Lucien Mathay schrieb am 06.06.2022 um 10:42:
>>>>>>>>>>> Hello,
>>>>>>>>>>>
>>>>>>>>>>> I would like to report the following bug : in the macros when a
>>>>>>>>>>> line containing "if ... then ... else" is followed by a
>>>>>>>>>>> comment on
>>>>>>>>>>> the same line, the compiler fails.
>>>>>>>>>>>
>>>>>>>>>>> Example :
>>>>>>>>>>>
>>>>>>>>>>> Function test()
>>>>>>>>>>> dim a as long, b as long
>>>>>>>>>>> a=0: b=0
>>>>>>>>>>> if a = b then a=1 else a=2 'test
>>>>>>>>>>> b=1
>>>>>>>>>>> call msgbox b
>>>>>>>>>>> End Function
>>>>>>>>>> The if-statement misses endif.
>>>>>>>>>>
>>>>>>>>>> Kind regards,
>>>>>>>>>> Regina
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>
>>>>>>>> To unsubscribe,e-mail:qa-unsubscribe@openoffice.apache.org
>>>>>>>> For additional commands,e-mail:qa-help@openoffice.apache.org
>>>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>>
>>>>>> To unsubscribe,e-mail:qa-unsubscribe@openoffice.apache.org
>>>>>> For additional commands,e-mail:qa-help@openoffice.apache.org
>>>>>>
>
Re: Bug report : comment after "if ... then ... else"
Posted by Lucien Mathay <MA...@live.fr>.
This bug is now fixed.
Thanks Matthias.
Le 14/06/22 à 16:52, Matthias Seidel a écrit :
> Hi Lucien,
>
> Please find my latest builds for Windows here:
>
> https://home.apache.org/~mseidel/AOO-builds/AOO-4113-Test/Full%20Installation/
>
> Regards,
>
> Matthias
>
> Am 13.06.22 um 19:05 schrieb Matthias Seidel:
>> Hi Lucien,
>>
>> Am 13.06.22 um 18:23 schrieb Lucien Mathay:
>>> Hi Mathias,
>>>
>>> yes, I can test it out with pleasure.
>> Great!
>>> I use Windows XP. It's the easiest for me, but I can also have
>>> access to a Windows 10.
>> Windows XP *should* work. Try that and if you find the time test on Win
>> 10...
>>
>> I will start a new build now and will come back when finished and uploaded.
>>
>> Regards,
>>
>> Matthias
>>
>>> Regards,
>>> Lucien.
>>>
>>> Le 11/06/22 à 16:51, Matthias Seidel a écrit :
>>>> Hi Carl,
>>>>
>>>> Now that the fix is in AOO41X I will prepare a new build (for Windows).
>>>>
>>>> Maybe Lucien can test/confirm the issue is solved?
>>>>
>>>> @Lucien: What OS do you use?
>>>>
>>>> Regards,
>>>>
>>>> Matthias
>>>>
>>>> Am 07.06.22 um 23:23 schrieb Carl Marcum:
>>>>> Hi Matthias,
>>>>>
>>>>> On 6/7/22 6:53 AM, Matthias Seidel wrote:
>>>>>> Hi Carl,
>>>>>>
>>>>>> Am 07.06.22 um 00:59 schrieb Carl Marcum:
>>>>>>> Hi Lucien,
>>>>>>>
>>>>>>> On 6/6/22 12:51 PM, Lucien Mathay wrote:
>>>>>>>> Thank you Regina, but
>>>>>>>>
>>>>>>>> if I add an 'endif' at the end of the line
>>>>>>>> ( " if a = b then a=1 Else a=2 endif 'test "),
>>>>>>>> the compiler fails with the message "Syntax error : unexpectes
>>>>>>>> symbol
>>>>>>>> : End If".
>>>>>>>>
>>>>>>>> Furthermore, the book from "OpenOffice .org Macros OoOffice et
>>>>>>>> Apis" from Bernard Marcelly and Laurent Goddard states p.118 :
>>>>>>>>
>>>>>>>> "Lorsqu’une seule instruction suffit dans la partie Then et dans la
>>>>>>>> partie Else, la séquence peut s’écrire sur une seule ligne :
>>>>>>>> If expr1 Then instruction1v Else instruction1f
>>>>>>>> Notez l’absence du End If dans cette forme simplifiée."
>>>>>>>> which means, translated :
>>>>>>>>
>>>>>>>> "When only one instruction is used in the section Then and in the
>>>>>>>> section Else, the sequence can be written on one single line :
>>>>>>>> If expr1 Then instruction1v Else instruction1f
>>>>>>>> Please note the absence of End If in this simplified usage"
>>>>>>>>
>>>>>>>> Therefore I still consider this as a bug.
>>>>>>> I believe you are correct.
>>>>>>>
>>>>>>> In my recent work on making the trunk test suites standalone to run
>>>>>>> against other branches like AOO41X I discovered some other bug fixes
>>>>>>> that were applied to trunk and AOO42X but never back ported to
>>>>>>> AOO41X.
>>>>>>>
>>>>>>> Two examples I put in a PR-150 [1]. One of which related to variable
>>>>>>> names in single-line if statements.
>>>>>>> I tested your example against that build but it isn't fixed by it but
>>>>>>> I believe I found the patch that fixed your bug in trunk [2].
>>>>>>> Issue 126272 [3] is listed in Bugzilla with a target milestone of
>>>>>>> 4.2.
>>>>>>> I think this needs a more general discussion on dev@ about how
>>>>>>> much we
>>>>>>> should change API's in 4.1.X.
>>>>>>> Which I intended to do anyway before merging my PR-150.
>>>>>>>
>>>>>>> Thanks for pointing this out!
>>>>>>>
>>>>>>> [1]https://github.com/apache/openoffice/pull/150
>>>>>>> [2]
>>>>>>> https://github.com/apache/openoffice/commit/07396187f6055b1e7cffa86f38cc88b274dfb1d6
>>>>>>>
>>>>>>>
>>>>>>> [3]https://bz.apache.org/ooo/show_bug.cgi?id=126272
>>>>>> I think this fix [2] should be cherry-picked to AOO41X.
>>>>>>
>>>>>> BTW: The target milestone 4.2.0 was trunk at that time. Later we made
>>>>>> trunk 4.5.0 and branched 4.2.0, but the milestones were not updated.
>>>>> Yes, I just want to make sure it wasn't intentional to leave this one
>>>>> and a few other changes the the Basic macros out of the 4.1 line due
>>>>> to not wanting to change API or code behavior.
>>>>> I will create a PR for it or maybe just add it to the other one I've
>>>>> got open since they are all small and bring a discussion on dev@.
>>>>>
>>>>> Then if we agree it's okay I'll pull them in.
>>>>>
>>>>> Best regards,
>>>>> Carl
>>>>>> Regards,
>>>>>>
>>>>>> Matthias
>>>>>>
>>>>>>> Best regards,
>>>>>>> Carl
>>>>>>>> With kind regards,
>>>>>>>> Lucien
>>>>>>>>
>>>>>>>> Le 6/06/22 à 13:32, Regina Henschel a écrit :
>>>>>>>>> Hi Lucien,
>>>>>>>>>
>>>>>>>>> Lucien Mathay schrieb am 06.06.2022 um 10:42:
>>>>>>>>>> Hello,
>>>>>>>>>>
>>>>>>>>>> I would like to report the following bug : in the macros when a
>>>>>>>>>> line containing "if ... then ... else" is followed by a comment on
>>>>>>>>>> the same line, the compiler fails.
>>>>>>>>>>
>>>>>>>>>> Example :
>>>>>>>>>>
>>>>>>>>>> Function test()
>>>>>>>>>> dim a as long, b as long
>>>>>>>>>> a=0: b=0
>>>>>>>>>> if a = b then a=1 else a=2 'test
>>>>>>>>>> b=1
>>>>>>>>>> call msgbox b
>>>>>>>>>> End Function
>>>>>>>>> The if-statement misses endif.
>>>>>>>>>
>>>>>>>>> Kind regards,
>>>>>>>>> Regina
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe,e-mail:qa-unsubscribe@openoffice.apache.org
>>>>>>> For additional commands,e-mail:qa-help@openoffice.apache.org
>>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe,e-mail:qa-unsubscribe@openoffice.apache.org
>>>>> For additional commands,e-mail:qa-help@openoffice.apache.org
>>>>>
Re: Bug report : comment after "if ... then ... else"
Posted by Matthias Seidel <ma...@hamburg.de>.
Hi Lucien,
Please find my latest builds for Windows here:
https://home.apache.org/~mseidel/AOO-builds/AOO-4113-Test/Full%20Installation/
Regards,
Matthias
Am 13.06.22 um 19:05 schrieb Matthias Seidel:
> Hi Lucien,
>
> Am 13.06.22 um 18:23 schrieb Lucien Mathay:
>> Hi Mathias,
>>
>> yes, I can test it out with pleasure.
> Great!
>> I use Windows XP. It's the easiest for me, but I can also have
>> access to a Windows 10.
> Windows XP *should* work. Try that and if you find the time test on Win
> 10...
>
> I will start a new build now and will come back when finished and uploaded.
>
> Regards,
>
> Matthias
>
>> Regards,
>> Lucien.
>>
>> Le 11/06/22 à 16:51, Matthias Seidel a écrit :
>>> Hi Carl,
>>>
>>> Now that the fix is in AOO41X I will prepare a new build (for Windows).
>>>
>>> Maybe Lucien can test/confirm the issue is solved?
>>>
>>> @Lucien: What OS do you use?
>>>
>>> Regards,
>>>
>>> Matthias
>>>
>>> Am 07.06.22 um 23:23 schrieb Carl Marcum:
>>>> Hi Matthias,
>>>>
>>>> On 6/7/22 6:53 AM, Matthias Seidel wrote:
>>>>> Hi Carl,
>>>>>
>>>>> Am 07.06.22 um 00:59 schrieb Carl Marcum:
>>>>>> Hi Lucien,
>>>>>>
>>>>>> On 6/6/22 12:51 PM, Lucien Mathay wrote:
>>>>>>> Thank you Regina, but
>>>>>>>
>>>>>>> if I add an 'endif' at the end of the line
>>>>>>> ( " if a = b then a=1 Else a=2 endif 'test "),
>>>>>>> the compiler fails with the message "Syntax error : unexpectes
>>>>>>> symbol
>>>>>>> : End If".
>>>>>>>
>>>>>>> Furthermore, the book from "OpenOffice .org Macros OoOffice et
>>>>>>> Apis" from Bernard Marcelly and Laurent Goddard states p.118 :
>>>>>>>
>>>>>>> "Lorsqu’une seule instruction suffit dans la partie Then et dans la
>>>>>>> partie Else, la séquence peut s’écrire sur une seule ligne :
>>>>>>> If expr1 Then instruction1v Else instruction1f
>>>>>>> Notez l’absence du End If dans cette forme simplifiée."
>>>>>>> which means, translated :
>>>>>>>
>>>>>>> "When only one instruction is used in the section Then and in the
>>>>>>> section Else, the sequence can be written on one single line :
>>>>>>> If expr1 Then instruction1v Else instruction1f
>>>>>>> Please note the absence of End If in this simplified usage"
>>>>>>>
>>>>>>> Therefore I still consider this as a bug.
>>>>>> I believe you are correct.
>>>>>>
>>>>>> In my recent work on making the trunk test suites standalone to run
>>>>>> against other branches like AOO41X I discovered some other bug fixes
>>>>>> that were applied to trunk and AOO42X but never back ported to
>>>>>> AOO41X.
>>>>>>
>>>>>> Two examples I put in a PR-150 [1]. One of which related to variable
>>>>>> names in single-line if statements.
>>>>>> I tested your example against that build but it isn't fixed by it but
>>>>>> I believe I found the patch that fixed your bug in trunk [2].
>>>>>> Issue 126272 [3] is listed in Bugzilla with a target milestone of
>>>>>> 4.2.
>>>>>> I think this needs a more general discussion on dev@ about how
>>>>>> much we
>>>>>> should change API's in 4.1.X.
>>>>>> Which I intended to do anyway before merging my PR-150.
>>>>>>
>>>>>> Thanks for pointing this out!
>>>>>>
>>>>>> [1]https://github.com/apache/openoffice/pull/150
>>>>>> [2]
>>>>>> https://github.com/apache/openoffice/commit/07396187f6055b1e7cffa86f38cc88b274dfb1d6
>>>>>>
>>>>>>
>>>>>> [3]https://bz.apache.org/ooo/show_bug.cgi?id=126272
>>>>> I think this fix [2] should be cherry-picked to AOO41X.
>>>>>
>>>>> BTW: The target milestone 4.2.0 was trunk at that time. Later we made
>>>>> trunk 4.5.0 and branched 4.2.0, but the milestones were not updated.
>>>> Yes, I just want to make sure it wasn't intentional to leave this one
>>>> and a few other changes the the Basic macros out of the 4.1 line due
>>>> to not wanting to change API or code behavior.
>>>> I will create a PR for it or maybe just add it to the other one I've
>>>> got open since they are all small and bring a discussion on dev@.
>>>>
>>>> Then if we agree it's okay I'll pull them in.
>>>>
>>>> Best regards,
>>>> Carl
>>>>> Regards,
>>>>>
>>>>> Matthias
>>>>>
>>>>>> Best regards,
>>>>>> Carl
>>>>>>> With kind regards,
>>>>>>> Lucien
>>>>>>>
>>>>>>> Le 6/06/22 à 13:32, Regina Henschel a écrit :
>>>>>>>> Hi Lucien,
>>>>>>>>
>>>>>>>> Lucien Mathay schrieb am 06.06.2022 um 10:42:
>>>>>>>>> Hello,
>>>>>>>>>
>>>>>>>>> I would like to report the following bug : in the macros when a
>>>>>>>>> line containing "if ... then ... else" is followed by a comment on
>>>>>>>>> the same line, the compiler fails.
>>>>>>>>>
>>>>>>>>> Example :
>>>>>>>>>
>>>>>>>>> Function test()
>>>>>>>>> dim a as long, b as long
>>>>>>>>> a=0: b=0
>>>>>>>>> if a = b then a=1 else a=2 'test
>>>>>>>>> b=1
>>>>>>>>> call msgbox b
>>>>>>>>> End Function
>>>>>>>> The if-statement misses endif.
>>>>>>>>
>>>>>>>> Kind regards,
>>>>>>>> Regina
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail:qa-unsubscribe@openoffice.apache.org
>>>>>> For additional commands, e-mail:qa-help@openoffice.apache.org
>>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail:qa-unsubscribe@openoffice.apache.org
>>>> For additional commands, e-mail:qa-help@openoffice.apache.org
>>>>
Re: Bug report : comment after "if ... then ... else"
Posted by Matthias Seidel <ma...@hamburg.de>.
Hi Lucien,
Am 13.06.22 um 18:23 schrieb Lucien Mathay:
> Hi Mathias,
>
> yes, I can test it out with pleasure.
Great!
>
> I use Windows XP. It's the easiest for me, but I can also have
> access to a Windows 10.
Windows XP *should* work. Try that and if you find the time test on Win
10...
I will start a new build now and will come back when finished and uploaded.
Regards,
Matthias
>
> Regards,
> Lucien.
>
> Le 11/06/22 à 16:51, Matthias Seidel a écrit :
>> Hi Carl,
>>
>> Now that the fix is in AOO41X I will prepare a new build (for Windows).
>>
>> Maybe Lucien can test/confirm the issue is solved?
>>
>> @Lucien: What OS do you use?
>>
>> Regards,
>>
>> Matthias
>>
>> Am 07.06.22 um 23:23 schrieb Carl Marcum:
>>> Hi Matthias,
>>>
>>> On 6/7/22 6:53 AM, Matthias Seidel wrote:
>>>> Hi Carl,
>>>>
>>>> Am 07.06.22 um 00:59 schrieb Carl Marcum:
>>>>> Hi Lucien,
>>>>>
>>>>> On 6/6/22 12:51 PM, Lucien Mathay wrote:
>>>>>> Thank you Regina, but
>>>>>>
>>>>>> if I add an 'endif' at the end of the line
>>>>>> ( " if a = b then a=1 Else a=2 endif 'test "),
>>>>>> the compiler fails with the message "Syntax error : unexpectes
>>>>>> symbol
>>>>>> : End If".
>>>>>>
>>>>>> Furthermore, the book from "OpenOffice .org Macros OoOffice et
>>>>>> Apis" from Bernard Marcelly and Laurent Goddard states p.118 :
>>>>>>
>>>>>> "Lorsqu’une seule instruction suffit dans la partie Then et dans la
>>>>>> partie Else, la séquence peut s’écrire sur une seule ligne :
>>>>>> If expr1 Then instruction1v Else instruction1f
>>>>>> Notez l’absence du End If dans cette forme simplifiée."
>>>>>> which means, translated :
>>>>>>
>>>>>> "When only one instruction is used in the section Then and in the
>>>>>> section Else, the sequence can be written on one single line :
>>>>>> If expr1 Then instruction1v Else instruction1f
>>>>>> Please note the absence of End If in this simplified usage"
>>>>>>
>>>>>> Therefore I still consider this as a bug.
>>>>> I believe you are correct.
>>>>>
>>>>> In my recent work on making the trunk test suites standalone to run
>>>>> against other branches like AOO41X I discovered some other bug fixes
>>>>> that were applied to trunk and AOO42X but never back ported to
>>>>> AOO41X.
>>>>>
>>>>> Two examples I put in a PR-150 [1]. One of which related to variable
>>>>> names in single-line if statements.
>>>>> I tested your example against that build but it isn't fixed by it but
>>>>> I believe I found the patch that fixed your bug in trunk [2].
>>>>> Issue 126272 [3] is listed in Bugzilla with a target milestone of
>>>>> 4.2.
>>>>> I think this needs a more general discussion on dev@ about how
>>>>> much we
>>>>> should change API's in 4.1.X.
>>>>> Which I intended to do anyway before merging my PR-150.
>>>>>
>>>>> Thanks for pointing this out!
>>>>>
>>>>> [1]https://github.com/apache/openoffice/pull/150
>>>>> [2]
>>>>> https://github.com/apache/openoffice/commit/07396187f6055b1e7cffa86f38cc88b274dfb1d6
>>>>>
>>>>>
>>>>> [3]https://bz.apache.org/ooo/show_bug.cgi?id=126272
>>>> I think this fix [2] should be cherry-picked to AOO41X.
>>>>
>>>> BTW: The target milestone 4.2.0 was trunk at that time. Later we made
>>>> trunk 4.5.0 and branched 4.2.0, but the milestones were not updated.
>>> Yes, I just want to make sure it wasn't intentional to leave this one
>>> and a few other changes the the Basic macros out of the 4.1 line due
>>> to not wanting to change API or code behavior.
>>> I will create a PR for it or maybe just add it to the other one I've
>>> got open since they are all small and bring a discussion on dev@.
>>>
>>> Then if we agree it's okay I'll pull them in.
>>>
>>> Best regards,
>>> Carl
>>>> Regards,
>>>>
>>>> Matthias
>>>>
>>>>> Best regards,
>>>>> Carl
>>>>>> With kind regards,
>>>>>> Lucien
>>>>>>
>>>>>> Le 6/06/22 à 13:32, Regina Henschel a écrit :
>>>>>>> Hi Lucien,
>>>>>>>
>>>>>>> Lucien Mathay schrieb am 06.06.2022 um 10:42:
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> I would like to report the following bug : in the macros when a
>>>>>>>> line containing "if ... then ... else" is followed by a comment on
>>>>>>>> the same line, the compiler fails.
>>>>>>>>
>>>>>>>> Example :
>>>>>>>>
>>>>>>>> Function test()
>>>>>>>> dim a as long, b as long
>>>>>>>> a=0: b=0
>>>>>>>> if a = b then a=1 else a=2 'test
>>>>>>>> b=1
>>>>>>>> call msgbox b
>>>>>>>> End Function
>>>>>>> The if-statement misses endif.
>>>>>>>
>>>>>>> Kind regards,
>>>>>>> Regina
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail:qa-unsubscribe@openoffice.apache.org
>>>>> For additional commands, e-mail:qa-help@openoffice.apache.org
>>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:qa-unsubscribe@openoffice.apache.org
>>> For additional commands, e-mail:qa-help@openoffice.apache.org
>>>
>
Re: Bug report : comment after "if ... then ... else"
Posted by Lucien Mathay <MA...@live.fr>.
Hi Mathias,
yes, I can test it out with pleasure.
I use Windows XP. It's the easiest for me, but I can also have access
to a Windows 10.
Regards,
Lucien.
Le 11/06/22 à 16:51, Matthias Seidel a écrit :
> Hi Carl,
>
> Now that the fix is in AOO41X I will prepare a new build (for Windows).
>
> Maybe Lucien can test/confirm the issue is solved?
>
> @Lucien: What OS do you use?
>
> Regards,
>
> Matthias
>
> Am 07.06.22 um 23:23 schrieb Carl Marcum:
>> Hi Matthias,
>>
>> On 6/7/22 6:53 AM, Matthias Seidel wrote:
>>> Hi Carl,
>>>
>>> Am 07.06.22 um 00:59 schrieb Carl Marcum:
>>>> Hi Lucien,
>>>>
>>>> On 6/6/22 12:51 PM, Lucien Mathay wrote:
>>>>> Thank you Regina, but
>>>>>
>>>>> if I add an 'endif' at the end of the line
>>>>> ( " if a = b then a=1 Else a=2 endif 'test "),
>>>>> the compiler fails with the message "Syntax error : unexpectes symbol
>>>>> : End If".
>>>>>
>>>>> Furthermore, the book from "OpenOffice .org Macros OoOffice et
>>>>> Apis" from Bernard Marcelly and Laurent Goddard states p.118 :
>>>>>
>>>>> "Lorsqu’une seule instruction suffit dans la partie Then et dans la
>>>>> partie Else, la séquence peut s’écrire sur une seule ligne :
>>>>> If expr1 Then instruction1v Else instruction1f
>>>>> Notez l’absence du End If dans cette forme simplifiée."
>>>>> which means, translated :
>>>>>
>>>>> "When only one instruction is used in the section Then and in the
>>>>> section Else, the sequence can be written on one single line :
>>>>> If expr1 Then instruction1v Else instruction1f
>>>>> Please note the absence of End If in this simplified usage"
>>>>>
>>>>> Therefore I still consider this as a bug.
>>>> I believe you are correct.
>>>>
>>>> In my recent work on making the trunk test suites standalone to run
>>>> against other branches like AOO41X I discovered some other bug fixes
>>>> that were applied to trunk and AOO42X but never back ported to AOO41X.
>>>>
>>>> Two examples I put in a PR-150 [1]. One of which related to variable
>>>> names in single-line if statements.
>>>> I tested your example against that build but it isn't fixed by it but
>>>> I believe I found the patch that fixed your bug in trunk [2].
>>>> Issue 126272 [3] is listed in Bugzilla with a target milestone of 4.2.
>>>> I think this needs a more general discussion on dev@ about how much we
>>>> should change API's in 4.1.X.
>>>> Which I intended to do anyway before merging my PR-150.
>>>>
>>>> Thanks for pointing this out!
>>>>
>>>> [1]https://github.com/apache/openoffice/pull/150
>>>> [2]
>>>> https://github.com/apache/openoffice/commit/07396187f6055b1e7cffa86f38cc88b274dfb1d6
>>>>
>>>> [3]https://bz.apache.org/ooo/show_bug.cgi?id=126272
>>> I think this fix [2] should be cherry-picked to AOO41X.
>>>
>>> BTW: The target milestone 4.2.0 was trunk at that time. Later we made
>>> trunk 4.5.0 and branched 4.2.0, but the milestones were not updated.
>> Yes, I just want to make sure it wasn't intentional to leave this one
>> and a few other changes the the Basic macros out of the 4.1 line due
>> to not wanting to change API or code behavior.
>> I will create a PR for it or maybe just add it to the other one I've
>> got open since they are all small and bring a discussion on dev@.
>>
>> Then if we agree it's okay I'll pull them in.
>>
>> Best regards,
>> Carl
>>> Regards,
>>>
>>> Matthias
>>>
>>>> Best regards,
>>>> Carl
>>>>> With kind regards,
>>>>> Lucien
>>>>>
>>>>> Le 6/06/22 à 13:32, Regina Henschel a écrit :
>>>>>> Hi Lucien,
>>>>>>
>>>>>> Lucien Mathay schrieb am 06.06.2022 um 10:42:
>>>>>>> Hello,
>>>>>>>
>>>>>>> I would like to report the following bug : in the macros when a
>>>>>>> line containing "if ... then ... else" is followed by a comment on
>>>>>>> the same line, the compiler fails.
>>>>>>>
>>>>>>> Example :
>>>>>>>
>>>>>>> Function test()
>>>>>>> dim a as long, b as long
>>>>>>> a=0: b=0
>>>>>>> if a = b then a=1 else a=2 'test
>>>>>>> b=1
>>>>>>> call msgbox b
>>>>>>> End Function
>>>>>> The if-statement misses endif.
>>>>>>
>>>>>> Kind regards,
>>>>>> Regina
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail:qa-unsubscribe@openoffice.apache.org
>>>> For additional commands, e-mail:qa-help@openoffice.apache.org
>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:qa-unsubscribe@openoffice.apache.org
>> For additional commands, e-mail:qa-help@openoffice.apache.org
>>
Re: Bug report : comment after "if ... then ... else"
Posted by Matthias Seidel <ma...@hamburg.de>.
Hi Carl,
Now that the fix is in AOO41X I will prepare a new build (for Windows).
Maybe Lucien can test/confirm the issue is solved?
@Lucien: What OS do you use?
Regards,
Matthias
Am 07.06.22 um 23:23 schrieb Carl Marcum:
> Hi Matthias,
>
> On 6/7/22 6:53 AM, Matthias Seidel wrote:
>> Hi Carl,
>>
>> Am 07.06.22 um 00:59 schrieb Carl Marcum:
>>> Hi Lucien,
>>>
>>> On 6/6/22 12:51 PM, Lucien Mathay wrote:
>>>> Thank you Regina, but
>>>>
>>>> if I add an 'endif' at the end of the line
>>>> ( " if a = b then a=1 Else a=2 endif 'test "),
>>>> the compiler fails with the message "Syntax error : unexpectes symbol
>>>> : End If".
>>>>
>>>> Furthermore, the book from "OpenOffice .org Macros OoOffice et
>>>> Apis" from Bernard Marcelly and Laurent Goddard states p.118 :
>>>>
>>>> "Lorsqu’une seule instruction suffit dans la partie Then et dans la
>>>> partie Else, la séquence peut s’écrire sur une seule ligne :
>>>> If expr1 Then instruction1v Else instruction1f
>>>> Notez l’absence du End If dans cette forme simplifiée."
>>>> which means, translated :
>>>>
>>>> "When only one instruction is used in the section Then and in the
>>>> section Else, the sequence can be written on one single line :
>>>> If expr1 Then instruction1v Else instruction1f
>>>> Please note the absence of End If in this simplified usage"
>>>>
>>>> Therefore I still consider this as a bug.
>>> I believe you are correct.
>>>
>>> In my recent work on making the trunk test suites standalone to run
>>> against other branches like AOO41X I discovered some other bug fixes
>>> that were applied to trunk and AOO42X but never back ported to AOO41X.
>>>
>>> Two examples I put in a PR-150 [1]. One of which related to variable
>>> names in single-line if statements.
>>> I tested your example against that build but it isn't fixed by it but
>>> I believe I found the patch that fixed your bug in trunk [2].
>>> Issue 126272 [3] is listed in Bugzilla with a target milestone of 4.2.
>>> I think this needs a more general discussion on dev@ about how much we
>>> should change API's in 4.1.X.
>>> Which I intended to do anyway before merging my PR-150.
>>>
>>> Thanks for pointing this out!
>>>
>>> [1] https://github.com/apache/openoffice/pull/150
>>> [2]
>>> https://github.com/apache/openoffice/commit/07396187f6055b1e7cffa86f38cc88b274dfb1d6
>>>
>>> [3] https://bz.apache.org/ooo/show_bug.cgi?id=126272
>> I think this fix [2] should be cherry-picked to AOO41X.
>>
>> BTW: The target milestone 4.2.0 was trunk at that time. Later we made
>> trunk 4.5.0 and branched 4.2.0, but the milestones were not updated.
>
> Yes, I just want to make sure it wasn't intentional to leave this one
> and a few other changes the the Basic macros out of the 4.1 line due
> to not wanting to change API or code behavior.
> I will create a PR for it or maybe just add it to the other one I've
> got open since they are all small and bring a discussion on dev@.
>
> Then if we agree it's okay I'll pull them in.
>
> Best regards,
> Carl
>>
>> Regards,
>>
>> Matthias
>>
>>> Best regards,
>>> Carl
>>>> With kind regards,
>>>> Lucien
>>>>
>>>> Le 6/06/22 à 13:32, Regina Henschel a écrit :
>>>>> Hi Lucien,
>>>>>
>>>>> Lucien Mathay schrieb am 06.06.2022 um 10:42:
>>>>>> Hello,
>>>>>>
>>>>>> I would like to report the following bug : in the macros when a
>>>>>> line containing "if ... then ... else" is followed by a comment on
>>>>>> the same line, the compiler fails.
>>>>>>
>>>>>> Example :
>>>>>>
>>>>>> Function test()
>>>>>> dim a as long, b as long
>>>>>> a=0: b=0
>>>>>> if a = b then a=1 else a=2 'test
>>>>>> b=1
>>>>>> call msgbox b
>>>>>> End Function
>>>>> The if-statement misses endif.
>>>>>
>>>>> Kind regards,
>>>>> Regina
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: qa-unsubscribe@openoffice.apache.org
>>> For additional commands, e-mail: qa-help@openoffice.apache.org
>>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: qa-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: qa-help@openoffice.apache.org
>
Re: Bug report : comment after "if ... then ... else"
Posted by Carl Marcum <cm...@apache.org>.
Hi Matthias,
On 6/7/22 6:53 AM, Matthias Seidel wrote:
> Hi Carl,
>
> Am 07.06.22 um 00:59 schrieb Carl Marcum:
>> Hi Lucien,
>>
>> On 6/6/22 12:51 PM, Lucien Mathay wrote:
>>> Thank you Regina, but
>>>
>>> if I add an 'endif' at the end of the line
>>> ( " if a = b then a=1 Else a=2 endif 'test "),
>>> the compiler fails with the message "Syntax error : unexpectes symbol
>>> : End If".
>>>
>>> Furthermore, the book from "OpenOffice .org Macros OoOffice et
>>> Apis" from Bernard Marcelly and Laurent Goddard states p.118 :
>>>
>>> "Lorsqu’une seule instruction suffit dans la partie Then et dans la
>>> partie Else, la séquence peut s’écrire sur une seule ligne :
>>> If expr1 Then instruction1v Else instruction1f
>>> Notez l’absence du End If dans cette forme simplifiée."
>>> which means, translated :
>>>
>>> "When only one instruction is used in the section Then and in the
>>> section Else, the sequence can be written on one single line :
>>> If expr1 Then instruction1v Else instruction1f
>>> Please note the absence of End If in this simplified usage"
>>>
>>> Therefore I still consider this as a bug.
>> I believe you are correct.
>>
>> In my recent work on making the trunk test suites standalone to run
>> against other branches like AOO41X I discovered some other bug fixes
>> that were applied to trunk and AOO42X but never back ported to AOO41X.
>>
>> Two examples I put in a PR-150 [1]. One of which related to variable
>> names in single-line if statements.
>> I tested your example against that build but it isn't fixed by it but
>> I believe I found the patch that fixed your bug in trunk [2].
>> Issue 126272 [3] is listed in Bugzilla with a target milestone of 4.2.
>> I think this needs a more general discussion on dev@ about how much we
>> should change API's in 4.1.X.
>> Which I intended to do anyway before merging my PR-150.
>>
>> Thanks for pointing this out!
>>
>> [1] https://github.com/apache/openoffice/pull/150
>> [2]
>> https://github.com/apache/openoffice/commit/07396187f6055b1e7cffa86f38cc88b274dfb1d6
>> [3] https://bz.apache.org/ooo/show_bug.cgi?id=126272
> I think this fix [2] should be cherry-picked to AOO41X.
>
> BTW: The target milestone 4.2.0 was trunk at that time. Later we made
> trunk 4.5.0 and branched 4.2.0, but the milestones were not updated.
Yes, I just want to make sure it wasn't intentional to leave this one
and a few other changes the the Basic macros out of the 4.1 line due to
not wanting to change API or code behavior.
I will create a PR for it or maybe just add it to the other one I've got
open since they are all small and bring a discussion on dev@.
Then if we agree it's okay I'll pull them in.
Best regards,
Carl
>
> Regards,
>
> Matthias
>
>> Best regards,
>> Carl
>>> With kind regards,
>>> Lucien
>>>
>>> Le 6/06/22 à 13:32, Regina Henschel a écrit :
>>>> Hi Lucien,
>>>>
>>>> Lucien Mathay schrieb am 06.06.2022 um 10:42:
>>>>> Hello,
>>>>>
>>>>> I would like to report the following bug : in the macros when a
>>>>> line containing "if ... then ... else" is followed by a comment on
>>>>> the same line, the compiler fails.
>>>>>
>>>>> Example :
>>>>>
>>>>> Function test()
>>>>> dim a as long, b as long
>>>>> a=0: b=0
>>>>> if a = b then a=1 else a=2 'test
>>>>> b=1
>>>>> call msgbox b
>>>>> End Function
>>>> The if-statement misses endif.
>>>>
>>>> Kind regards,
>>>> Regina
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: qa-unsubscribe@openoffice.apache.org
>> For additional commands, e-mail: qa-help@openoffice.apache.org
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: qa-unsubscribe@openoffice.apache.org
For additional commands, e-mail: qa-help@openoffice.apache.org
Re: Bug report : comment after "if ... then ... else"
Posted by Matthias Seidel <ma...@hamburg.de>.
Hi Carl,
Am 07.06.22 um 00:59 schrieb Carl Marcum:
> Hi Lucien,
>
> On 6/6/22 12:51 PM, Lucien Mathay wrote:
>> Thank you Regina, but
>>
>> if I add an 'endif' at the end of the line
>> ( " if a = b then a=1 Else a=2 endif 'test "),
>> the compiler fails with the message "Syntax error : unexpectes symbol
>> : End If".
>>
>> Furthermore, the book from "OpenOffice .org Macros OoOffice et
>> Apis" from Bernard Marcelly and Laurent Goddard states p.118 :
>>
>> "Lorsqu’une seule instruction suffit dans la partie Then et dans la
>> partie Else, la séquence peut s’écrire sur une seule ligne :
>> If expr1 Then instruction1v Else instruction1f
>> Notez l’absence du End If dans cette forme simplifiée."
>> which means, translated :
>>
>> "When only one instruction is used in the section Then and in the
>> section Else, the sequence can be written on one single line :
>> If expr1 Then instruction1v Else instruction1f
>> Please note the absence of End If in this simplified usage"
>>
>> Therefore I still consider this as a bug.
>
> I believe you are correct.
>
> In my recent work on making the trunk test suites standalone to run
> against other branches like AOO41X I discovered some other bug fixes
> that were applied to trunk and AOO42X but never back ported to AOO41X.
>
> Two examples I put in a PR-150 [1]. One of which related to variable
> names in single-line if statements.
> I tested your example against that build but it isn't fixed by it but
> I believe I found the patch that fixed your bug in trunk [2].
> Issue 126272 [3] is listed in Bugzilla with a target milestone of 4.2.
> I think this needs a more general discussion on dev@ about how much we
> should change API's in 4.1.X.
> Which I intended to do anyway before merging my PR-150.
>
> Thanks for pointing this out!
>
> [1] https://github.com/apache/openoffice/pull/150
> [2]
> https://github.com/apache/openoffice/commit/07396187f6055b1e7cffa86f38cc88b274dfb1d6
> [3] https://bz.apache.org/ooo/show_bug.cgi?id=126272
I think this fix [2] should be cherry-picked to AOO41X.
BTW: The target milestone 4.2.0 was trunk at that time. Later we made
trunk 4.5.0 and branched 4.2.0, but the milestones were not updated.
Regards,
Matthias
>
> Best regards,
> Carl
>>
>> With kind regards,
>> Lucien
>>
>> Le 6/06/22 à 13:32, Regina Henschel a écrit :
>>> Hi Lucien,
>>>
>>> Lucien Mathay schrieb am 06.06.2022 um 10:42:
>>>> Hello,
>>>>
>>>> I would like to report the following bug : in the macros when a
>>>> line containing "if ... then ... else" is followed by a comment on
>>>> the same line, the compiler fails.
>>>>
>>>> Example :
>>>>
>>>> Function test()
>>>> dim a as long, b as long
>>>> a=0: b=0
>>>> if a = b then a=1 else a=2 'test
>>>> b=1
>>>> call msgbox b
>>>> End Function
>>>
>>> The if-statement misses endif.
>>>
>>> Kind regards,
>>> Regina
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: qa-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: qa-help@openoffice.apache.org
>
Re: Bug report : comment after "if ... then ... else"
Posted by Carl Marcum <cm...@apache.org>.
Hi Lucien,
On 6/6/22 12:51 PM, Lucien Mathay wrote:
> Thank you Regina, but
>
> if I add an 'endif' at the end of the line
> ( " if a = b then a=1 Else a=2 endif 'test "),
> the compiler fails with the message "Syntax error : unexpectes symbol
> : End If".
>
> Furthermore, the book from "OpenOffice .org Macros OoOffice et
> Apis" from Bernard Marcelly and Laurent Goddard states p.118 :
>
> "Lorsqu’une seule instruction suffit dans la partie Then et dans la
> partie Else, la séquence peut s’écrire sur une seule ligne :
> If expr1 Then instruction1v Else instruction1f
> Notez l’absence du End If dans cette forme simplifiée."
> which means, translated :
>
> "When only one instruction is used in the section Then and in the
> section Else, the sequence can be written on one single line :
> If expr1 Then instruction1v Else instruction1f
> Please note the absence of End If in this simplified usage"
>
> Therefore I still consider this as a bug.
I believe you are correct.
In my recent work on making the trunk test suites standalone to run
against other branches like AOO41X I discovered some other bug fixes
that were applied to trunk and AOO42X but never back ported to AOO41X.
Two examples I put in a PR-150 [1]. One of which related to variable
names in single-line if statements.
I tested your example against that build but it isn't fixed by it but I
believe I found the patch that fixed your bug in trunk [2].
Issue 126272 [3] is listed in Bugzilla with a target milestone of 4.2.
I think this needs a more general discussion on dev@ about how much we
should change API's in 4.1.X.
Which I intended to do anyway before merging my PR-150.
Thanks for pointing this out!
[1] https://github.com/apache/openoffice/pull/150
[2]
https://github.com/apache/openoffice/commit/07396187f6055b1e7cffa86f38cc88b274dfb1d6
[3] https://bz.apache.org/ooo/show_bug.cgi?id=126272
Best regards,
Carl
>
> With kind regards,
> Lucien
>
> Le 6/06/22 à 13:32, Regina Henschel a écrit :
>> Hi Lucien,
>>
>> Lucien Mathay schrieb am 06.06.2022 um 10:42:
>>> Hello,
>>>
>>> I would like to report the following bug : in the macros when a line
>>> containing "if ... then ... else" is followed by a comment on the
>>> same line, the compiler fails.
>>>
>>> Example :
>>>
>>> Function test()
>>> dim a as long, b as long
>>> a=0: b=0
>>> if a = b then a=1 else a=2 'test
>>> b=1
>>> call msgbox b
>>> End Function
>>
>> The if-statement misses endif.
>>
>> Kind regards,
>> Regina
>
---------------------------------------------------------------------
To unsubscribe, e-mail: qa-unsubscribe@openoffice.apache.org
For additional commands, e-mail: qa-help@openoffice.apache.org
Re: Bug report : comment after "if ... then ... else"
Posted by Lucien Mathay <MA...@live.fr>.
Thank you Regina, but
if I add an 'endif' at the end of the line
( " if a = b then a=1 Else a=2 endif 'test "),
the compiler fails with the message "Syntax error : unexpectes symbol :
End If".
Furthermore, the book from "OpenOffice .org Macros OoOffice et
Apis" from Bernard Marcelly and Laurent Goddard states p.118 :
"Lorsqu’une seule instruction suffit dans la partie Then et dans la
partie Else, la séquence peut s’écrire sur une seule ligne :
If expr1 Then instruction1v Else instruction1f
Notez l’absence du End If dans cette forme simplifiée."
which means, translated :
"When only one instruction is used in the section Then and in the
section Else, the sequence can be written on one single line :
If expr1 Then instruction1v Else instruction1f
Please note the absence of End If in this simplified usage"
Therefore I still consider this as a bug.
With kind regards,
Lucien
Le 6/06/22 à 13:32, Regina Henschel a écrit :
> Hi Lucien,
>
> Lucien Mathay schrieb am 06.06.2022 um 10:42:
>> Hello,
>>
>> I would like to report the following bug : in the macros when a line
>> containing "if ... then ... else" is followed by a comment on the
>> same line, the compiler fails.
>>
>> Example :
>>
>> Function test()
>> dim a as long, b as long
>> a=0: b=0
>> if a = b then a=1 else a=2 'test
>> b=1
>> call msgbox b
>> End Function
>
> The if-statement misses endif.
>
> Kind regards,
> Regina
Re: Bug report : comment after "if ... then ... else"
Posted by Regina Henschel <rb...@t-online.de>.
Hi Lucien,
Lucien Mathay schrieb am 06.06.2022 um 10:42:
> Hello,
>
> I would like to report the following bug : in the macros when a line
> containing "if ... then ... else" is followed by a comment on the same
> line, the compiler fails.
>
> Example :
>
> Function test()
> dim a as long, b as long
> a=0: b=0
> if a = b then a=1 else a=2 'test
> b=1
> call msgbox b
> End Function
The if-statement misses endif.
Kind regards,
Regina
---------------------------------------------------------------------
To unsubscribe, e-mail: qa-unsubscribe@openoffice.apache.org
For additional commands, e-mail: qa-help@openoffice.apache.org