Comments in scripts in form sections should be allowed to end with multiple * signs

Discuss features, issues, about Editors for AHK
User avatar
A Keymaker
Posts: 455
Joined: 31 May 2022, 13:46
Location: Donjon du Château de Mérovingien

Comments in scripts in form sections should be allowed to end with multiple * signs

14 Jun 2022, 08:14

if I am not mistaken a comment area in scripts can begin not only with

Code: Select all

/*
but also

Code: Select all

/**
and even

Code: Select all

/********************************************************************************


But on the other hand this version of comments has to end with

Code: Select all

*/
because using even as little as

Code: Select all

**/
is not viewed as a end-comment-section marker - thus the comment section continues until it reaches either a marker for star-comment-section or end of the script


This is inconsistent behavior and in my opinion allowing for multiple * signs before / sign would allow users to mark sections of their codes in a more graphical and at the same time unified way
Last edited by A Keymaker on 16 Jun 2022, 08:20, edited 2 times in total.
gregster
Posts: 9035
Joined: 30 Sep 2013, 06:48

Re: Comments in scripts in form sections sgould be allowed to end with multiple * signs

14 Jun 2022, 09:23

It's consistent in a way that both, /* and */, have to be at a line start, in AHK v1.
Afaik, */ is already allowed at the line end in AHK v2.
I wouldn't expect a change of the v1 behaviour (and it could break code), but if you wanted to suggest it, the Editors subforum wouldn't be the right place, since it's a language feature, and editors have no influence on it. The Wish List subforum would be more appropriate, imo.
User avatar
A Keymaker
Posts: 455
Joined: 31 May 2022, 13:46
Location: Donjon du Château de Mérovingien

Re: Comments in scripts in form sections sgould be allowed to end with multiple * signs

15 Jun 2022, 12:22

gregster wrote:
14 Jun 2022, 09:23
[...]
if you wanted to suggest it, the Editors subforum wouldn't be the right place
[...]
I just did: viewtopic.php?f=13&t=105390

Thank you for the info
lexikos
Posts: 9592
Joined: 30 Sep 2013, 04:07
Contact:

Re: Comments in scripts in form sections should be allowed to end with multiple * signs

17 Jun 2022, 22:24

/* is the marker to start a comment. The rest of the line is just a part of the comment. I can start a comment like

Code: Select all

/*THIS IS MY COMMENT
This is also my comment
but by your logic,

Code: Select all

THIS IS MY COMMENT*/
should also be allowed to end the comment.

And it is. In v2.

(Again, */ is the end marker for the comment. Any asterisks preceding it are just meaningless characters.)

Return to “Editors”

Who is online

Users browsing this forum: No registered users and 42 guests