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/22 12:36:54 UTC

Bug Label not recognized after if...then Resume

Hello all,

I am back already.  I found a bug similar to the bug reported previously 
with "If...then...else" followed by a comment.

In the present case, the bug concerns a Label "exitfunction" that 
follows a line "if...then Resume" ; here is the code :

    Function EffacerFichier(nom As String, msg As String) As Boolean
         Dim nb As Long
       On Error GoTo erreur
        EffacerFichier = True
    GoTo exitfunction
    erreur:
       nb = nb + 1
       If nb<3 Then Resume
    exitfunction:
    End Function

The error message states : "Label 'exitfunction' undefined.

However when inserting a blank line just before the label 
'exitfunction', the compiler parses OK.

I tested it on both OO4.1.6 and OO4.1.12, both fail.

Sorry for that,
Lucien.



Re: Bug Label not recognized after if...then Resume

Posted by Matthias Seidel <ma...@hamburg.de>.
Hi Lucien,

Am 23.06.22 um 13:41 schrieb Lucien Mathay:
> Hi Mathias,
>
> Le 23/06/22 à 13:31, Matthias Seidel a écrit :
>> Since you are on Windows, you might also want to test on my personal
>> builds of AOO42X:
> no, it also fails.

Thanks for the information!

Regards,

   Matthias

>
> Best regards,
> Lucien


Re: Bug Label not recognized after if...then Resume

Posted by Lucien Mathay <MA...@live.fr>.
Hi Mathias,

Le 23/06/22 à 13:31, Matthias Seidel a écrit :
> Since you are on Windows, you might also want to test on my personal
> builds of AOO42X:
no, it also fails.

Best regards,
Lucien

Re: Bug Label not recognized after if...then Resume

Posted by Matthias Seidel <ma...@hamburg.de>.
Hi Lucien,

Am 22.06.22 um 14:36 schrieb Lucien Mathay:
> Hello all,
>
> I am back already.  I found a bug similar to the bug reported
> previously with "If...then...else" followed by a comment.
>
> In the present case, the bug concerns a Label "exitfunction" that
> follows a line "if...then Resume" ; here is the code :
>
>    Function EffacerFichier(nom As String, msg As String) As Boolean
>         Dim nb As Long
>       On Error GoTo erreur
>        EffacerFichier = True
>    GoTo exitfunction
>    erreur:
>       nb = nb + 1
>       If nb<3 Then Resume
>    exitfunction:
>    End Function
>
> The error message states : "Label 'exitfunction' undefined.
>
> However when inserting a blank line just before the label
> 'exitfunction', the compiler parses OK.
>
> I tested it on both OO4.1.6 and OO4.1.12, both fail.
>
> Sorry for that,

No need to apologize! ;-)

If the label is recognized with an empty line before, it is clearly a bug.

Since you are on Windows, you might also want to test on my personal
builds of AOO42X:

https://home.apache.org/~mseidel/AOO-builds/AOO-420-Test/Full%20Installation/

Regards,

   Matthias

> Lucien.
>
>
>