[FIXED] Bug with Comment behind Heredoc

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Post Reply
PeterH
Posts: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

[FIXED] Bug with Comment behind Heredoc

Post 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:
Last edited by PeterH on 23 Sep 2014 21:46, edited 1 time in total.

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

Re: Bug with Comment behind Heredoc

Post 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.
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

PeterH
Posts: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Bug with Comment behind Heredoc

Post 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.

PeterH
Posts: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Bug with Comment behind Heredoc

Post by PeterH »

:?:

admin
Site Admin
Posts: 67279
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Bug with Comment behind Heredoc

Post by admin »

No comments allowed there.

PeterH
Posts: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Bug with Comment behind Heredoc

Post by PeterH »

A bit strange, a bit sad, but can live with it :roll:

admin
Site Admin
Posts: 67279
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Bug with Comment behind Heredoc

Post by admin »

Might be fixed in next beta. :)

PeterH
Posts: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Bug with Comment behind Heredoc

Post by PeterH »

Thanks - will test and tell :om:

PeterH
Posts: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: [FIXED] Bug with Comment behind Heredoc

Post 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!

Post Reply