Re: Bug report : comment after "if ... then ... else"

2022-06-06 Thread Regina Henschel
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  

Re: Bug report : comment after "if ... then ... else"

2022-06-06 Thread 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

Bug report : comment after "if ... then ... else"

2022-06-06 Thread Lucien Mathay
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

Re: Bug report : comment after "if ... then ... else"

2022-06-06 Thread Czesław Wolański
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.

Re: Bug report : comment after "if ... then ... else"

2022-06-06 Thread Lucien Mathay
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

Re: Bug report : comment after "if ... then ... else"

2022-06-06 Thread Regina Henschel
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