Page 1 of 1

SC popupnested: comments cause overflow?

Posted: 05 Nov 2016 09:46
by Filehero
Hi Don,

shouldn't this code work without overflow?

Code: Select all

$menu = <<<MENU
                Top;;:paper;1
                  Sub;;;4
                  Sub
                    Sub2;;*.ini
                    Sub2
                    Sub2;;;2
                Top;;<xy>
              MENU;
  
  // this is a line (end) comment
  /*
  This is a block comment
  */
  text popupnested($menu);
  
  // this is a line (end) comment
  /*
  This is a block comment
  */
  */

Re: SC popupnested: comments cause overrun?

Posted: 05 Nov 2016 10:02
by highend
It's no bug.

You didn't close your heredoc correctly :mrgreen:
The closing identifier must begin in the *first* column of the line (no indent!).
Moved to questions and answers...

Re: SC popupnested: comments cause overrun?

Posted: 05 Nov 2016 10:33
by Filehero
highend wrote:It's no bug.

You didn't close your heredoc correctly :mrgreen:
Then Don has to correct the help and beta release note from where the uncommented example code has been copied from (note the intended heredoc closure). :mrgreen:

Thanks nevertheless. :)

Re: SC popupnested: comments cause overflow?

Posted: 05 Nov 2016 11:34
by highend
Yeah, viewtopic.php?f=1&t=4&start=3750#p143440

is indeed wrong ("MENU;" isn't correctly indented)

Re: SC popupnested: comments cause overflow?

Posted: 10 Nov 2016 18:38
by admin
I did not want to rewrite the docs, so I was happy to see this is really a bug (and I was happy to fix it). :biggrin:

FYI, closing HEREDOC identifier don't have to be left-aligned since v10.80.0010 - 2012-01-23 17:50.

Re: SC popupnested: comments cause overflow?

Posted: 10 Nov 2016 21:24
by Filehero
admin wrote:FYI, closing HEREDOC identifier don't have to be left-aligned since v10.80.0010 - 2012-01-23 17:50.
4 years, that's quite a piece of time. :mrgreen:

Thanks for fixing.