Page 1 of 1

[FIXED] Bug with Comment behind Heredoc

Posted: 18 Sep 2014 23:45
by PeterH
I have a construct like:

Code: Select all

      $items = <<<#>>>
End 'DeBug' (ESC)         : End
...
-
Call Demo '_Test' (Time!) : Demo#>>> ;   // <<<== create Selection Menu, then ==>>>
      $next = PopupMenu($items, 600, 300, , , , <crlf>, ' : ', 'Cancel');
In original, 1st and last lines, as well as the comment are prefixed with 2 Tab characters (instead of blanks)!
After having added the comment, the script fails. It seems the tabs in front of the comment are not converted to blanks, but misinterpreted as illegal characters in front of the next line.
I think this is a :bug: (as we are behind the end of the Heredoc)

Adding a NL between ';' and the tabs, i.e. moving the comment to it's own line, makes it work again. (But is 1 line more...)


And a correlated wish: would it be possible to allow a comment in the starting line of a Heredoc, i.e.

Code: Select all

      $items = <<<#>>> // document what's up here
End 'DeBug' (ESC)         : End
...
As here is soo much space waiting to be filled :roll:

Re: Bug with Comment behind Heredoc

Posted: 19 Sep 2014 00:32
by Marco
I guess the heredoc separator is considered to be anything in the first line between the <<< and crlf pair, both excluded. If you add the comment you screw all this.

Re: Bug with Comment behind Heredoc

Posted: 19 Sep 2014 00:45
by PeterH
Marco wrote:I guess the heredoc separator is considered to be anything in the first line between the <<< and crlf pair, both excluded. If you add the comment you screw all this.
This refers to my wish, I think.
If you were right, blank characters behind the heredoc-terminator would have a meaning - as they are in front of crlf - but they are ignored. So I don't think that behind (a) trailing blank(s) something with a meaning could follow. And then it should be possible to also ignore a (Line-End) comment.

Re: Bug with Comment behind Heredoc

Posted: 22 Sep 2014 12:15
by PeterH
:?:

Re: Bug with Comment behind Heredoc

Posted: 22 Sep 2014 21:00
by admin
No comments allowed there.

Re: Bug with Comment behind Heredoc

Posted: 23 Sep 2014 00:36
by PeterH
A bit strange, a bit sad, but can live with it :roll:

Re: Bug with Comment behind Heredoc

Posted: 23 Sep 2014 15:15
by admin
Might be fixed in next beta. :)

Re: Bug with Comment behind Heredoc

Posted: 23 Sep 2014 16:29
by PeterH
Thanks - will test and tell :om:

Re: [FIXED] Bug with Comment behind Heredoc

Posted: 23 Sep 2014 21:52
by PeterH
OK: it *is* fixed :appl:
Now this strange combination (Tab-separated comment on the endline of a <<<#>>> Heredoc) doesn't show an error :D

Thanks a lot!