<<< in comment not interpreted as comment

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

: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: 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: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
Post Reply
PeterH
Posts: 2830
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

<<< in comment not interpreted as comment

Post by PeterH »

Bug: <<< (can be more <) inside a multiline comment /* ... */ (if I see it correct at least from the 2nd line on) will be misinterpreted.
//§ Script
"XYinit"
/*
<<<*/
setting 'BackgroundFileOps', 0; // all fileops are serial!
// xxx

Run this, as it is. :arrow: Strange!
Delete the last line: there seems to be another error.
Restore the last line, but delete (at least) one of the '<' :arrow: all is fine!

I sometimes frame some lines I want to comment for a test by
/* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
lkdjhf lkdsjfh
lkj hgju qwe
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */
:arrow: that seems to "destroy" the complete script.
Bad if you made some more changes: you search for anything - but not for this!

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

Re: <<< in comment not interpreted as comment

Post by admin »

Confirmed. :tup: Should 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: <<< in comment not interpreted as comment

Post by PeterH »

Cannot confirm :?

Test with 0520 & 0521 shows the same problem as before.

Here's a better "form" of test-code. (Was too late last time?)
" " in front of /* and/or <<< don't make a change.

Code: Select all

//§ Script
"XYinit"
 /*
 <<< */
   echo "hai";
// xxx

klownboy
Posts: 4468
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: <<< in comment not interpreted as comment

Post by klownboy »

Well, something went wrong on the beta that fixed this bug. I'm receiving:
Dubious syntax: Determine XY location if($loc == "T")
for a script line that's commented as follows:

Code: Select all

//*** Determine XY location
   if($loc == "T") {
      if ($mod == 0) {load "<xyscripts>\XYmenu_NESTED.xys"; end 1;}

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

Re: <<< in comment not interpreted as comment

Post by admin »

Both issues should be fixed in next beta.

klownboy
Posts: 4468
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: <<< in comment not interpreted as comment

Post by klownboy »

Thanks Don. All the scripts I had issues with last night are running fine now. :tup:

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

[fixed] <<< in comment not interpreted as comment

Post by PeterH »

OK - now I've tested it with success :tup:

jupe
Posts: 3462
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: <<< in comment not interpreted as comment

Post by jupe »

Just thought I'd mention one scenario that used to work, and now doesn't, it seems the parser just got stricter, technically I guess maybe it shouldn't have used to work anyway, but did.

Code: Select all

"s0" e 0;
/*
"s2" e 2; // comment /* comment2 */
*/

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

Re: <<< in comment not interpreted as comment

Post by admin »

I'm not sure if PHP allows nested block comments (which I would find weird), but I think the parser is right to treat it as it does now (the red parts are the block comment):

"s0" e 0;
/*
"s2" e 2; // comment /* comment2 */

*/

jupe
Posts: 3462
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: <<< in comment not interpreted as comment

Post by jupe »

Yeah as I said I was suprised it used to work, I was just noting the change.

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

Re: <<< in comment not interpreted as comment

Post by PeterH »

In short: (I think) you're right. :tup:
No nested comments!

Post Reply