Page 1 of 1
<<< in comment not interpreted as comment
Posted: 03 Apr 2023 20:56
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.

Strange!
Delete the last line: there seems to be another error.
Restore the last line, but delete (at least) one of the '<'

all is fine!
I sometimes frame some lines I want to comment for a test by
/* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
lkdjhf lkdsjfh
lkj hgju qwe
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */

that seems to "destroy" the complete script.
Bad if you made some more changes: you search for anything - but not for this!
Re: <<< in comment not interpreted as comment
Posted: 04 Apr 2023 17:47
by admin
Confirmed.

Should be fixed in next beta.
Re: <<< in comment not interpreted as comment
Posted: 04 Apr 2023 23:52
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
Re: <<< in comment not interpreted as comment
Posted: 05 Apr 2023 00:12
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;}
Re: <<< in comment not interpreted as comment
Posted: 05 Apr 2023 07:52
by admin
Both issues should be fixed in next beta.
Re: <<< in comment not interpreted as comment
Posted: 05 Apr 2023 12:03
by klownboy
Thanks Don. All the scripts I had issues with last night are running fine now.

[fixed] <<< in comment not interpreted as comment
Posted: 05 Apr 2023 12:30
by PeterH
OK - now I've tested it with success

Re: <<< in comment not interpreted as comment
Posted: 06 Apr 2023 00:26
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 */
*/
Re: <<< in comment not interpreted as comment
Posted: 06 Apr 2023 10:08
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 */
*/
Re: <<< in comment not interpreted as comment
Posted: 06 Apr 2023 10:21
by jupe
Yeah as I said I was suprised it used to work, I was just noting the change.
Re: <<< in comment not interpreted as comment
Posted: 06 Apr 2023 11:17
by PeterH
In short: (I think) you're right.

No nested comments!