|
|
|
12-27-2023, 02:38 PM
|
#1
|
Human being with feelings
Join Date: Sep 2008
Location: Sweden
Posts: 7,432
|
IDE does not show commented out @gfx as comment...
I felt the need to comment out the whole @gfx section.
This had the unexpected effect that the IDE did not show the code as commented out:
I had to move the comment to below the @gfx clause:
I guess that this is an oversight in the IDE, since neither case shows any gfx section in the plugin.
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
|
|
|
12-27-2023, 03:11 PM
|
#2
|
Human being with feelings
Join Date: Sep 2018
Location: HH
Posts: 919
|
Quote:
Originally Posted by Fabian
I felt the need to comment out the whole @gfx section.
This had the unexpected effect that the IDE did not show the code as commented out:
I had to move the comment to below the @gfx clause:
I guess that this is an oversight in the IDE, since neither case shows any gfx section in the plugin.
|
/* comments always end at the bottom of the section in which they were written. Quite useful actually...
If you want to comment out @gfx, then you just have to do it that way:
Last edited by Zeno; 12-27-2023 at 06:38 PM.
|
|
|
12-28-2023, 11:00 AM
|
#3
|
Human being with feelings
Join Date: Sep 2008
Location: Sweden
Posts: 7,432
|
Quote:
Originally Posted by Zeno
/* comments always end at the bottom of the section in which they were written. Quite useful actually...
|
I don't know about the usefulness of that... seems more like an oversight to me.
Quote:
Originally Posted by Zeno
If you want to comment out @gfx, then you just have to do it that way:
|
Yes, as I show in the second figure.
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
|
|
|
12-28-2023, 11:29 AM
|
#4
|
Human being with feelings
Join Date: Sep 2008
Location: Sweden
Posts: 7,432
|
Quote:
Originally Posted by Zeno
/* comments always end at the bottom of the section in which they were written. Quite useful actually...
|
Actually, no. The code is commented out in either case; no gfx window shows in the UI, so apparently the compiler generates no code for the gfx section irrespective of where the comment begins. Thus, the comment does not end at the @gfx clause, it is just that the IDE does not show the code as commented out.
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
|
|
|
12-28-2023, 01:36 PM
|
#5
|
Human being with feelings
Join Date: Sep 2018
Location: HH
Posts: 919
|
Okay, I don't know why it has an effect on your @gfx section. It shouldn't really. It should be local to @section. I use this quite often to temporarily bypass code passages. If the code passage is at the end of a section, I don't have to scroll down and close the comment at the sections end. I even use this in @init and so far the /* comment has never affected the underlying @whatever sections.
|
|
|
12-28-2023, 04:36 PM
|
#6
|
Human being with feelings
Join Date: Mar 2021
Posts: 482
|
Yep, can confirm what Zeno says, I do the same
|
|
|
12-29-2023, 01:13 PM
|
#7
|
Human being with feelings
Join Date: Sep 2008
Location: Sweden
Posts: 7,432
|
OK, I've been making new experiments, and of course you guys are right, comments do end at the next section.
But there is still something strange with these non-terminated comments in the IDE.
Here, first the entire @gfx section is commented out, and no gfx window shows in the plugin, which is fine. Then I remove the first /* and recompile, and then the code that is marked by the IDE as commented executes!
Then, when I edit the middle line, that line is shown as active code, and when compiling and running, this change has effect. So strange...
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
|
|
|
12-29-2023, 01:37 PM
|
#8
|
Human being with feelings
Join Date: Sep 2018
Location: HH
Posts: 919
|
Strange... Something like this has never happened to me.
Guess: Maybe it's because the comment starts in the @gfx line. Does this behavior persist if you move the comment to the next line?
|
|
|
12-29-2023, 02:38 PM
|
#9
|
Human being with feelings
Join Date: Sep 2008
Location: Sweden
Posts: 7,432
|
Quote:
Originally Posted by Zeno
Strange... Something like this has never happened to me.
Guess: Maybe it's because the comment starts in the @gfx line. Does this behavior persist if you move the comment to the next line?
|
Yes, this seems to have something to do with the comment beginning on the @gfx line. If I hit enter before /* to move the comment to the next line, I don't see that behavior. This is reproducible.
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
|
|
|
12-29-2023, 02:41 PM
|
#10
|
Human being with feelings
Join Date: Sep 2018
Location: HH
Posts: 919
|
Congratulations,
I'd say you have a serious finding for the Nitpicks/Bug Report subforum
|
|
|
12-29-2023, 04:47 PM
|
#11
|
Human being with feelings
Join Date: Mar 2021
Posts: 482
|
My understanding is:
It's a comment, belonging to the @section above, and it's commenting out the rest of the file.
Code:
@gfx 100 100 /* comment
It's not really a comment, and has no impact on following lines.
"@section definitions" have different rules than the code and the parser simply ignores everything it doesn't need.
And I guess the code looking like it's commented out is a bug of the syntax highlighter
|
|
|
12-30-2023, 12:08 PM
|
#12
|
Human being with feelings
Join Date: Sep 2008
Location: Sweden
Posts: 7,432
|
Quote:
Originally Posted by souk21
My understanding is:
And I guess the code looking like it's commented out is a bug of the syntax highlighter
|
Ha! I knew there had to be a bug lurking there somewhere...
Quote:
Originally Posted by Zeno
Congratulations,
I'd say you have a serious finding for the Nitpicks/Bug Report subforum
|
Ha ha ha!
Thanks.
Yeah, I guess it's best I put it there
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
|
|
|
12-31-2023, 11:06 AM
|
#13
|
Human being with feelings
Join Date: Nov 2020
Posts: 186
|
Quote:
Originally Posted by souk21
Code:
@gfx 100 100 /* comment
It's not really a comment, and has no impact on following lines.
"@section definitions" have different rules than the code and the parser simply ignores everything it doesn't need.
|
do you find it expected ?
(i don't.)
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 07:57 AM.
|