Comments in v7?

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Comments in v7?

Post by snibgo »

As v7 has a slightly more formal scripting language, can I submit a mild request for comments? IM would ignore all characters between an open-comment and close-comment token. This could be useful during script development, to temporarily remove code, as well as allowing human-readable comments.

For the comment tokens, I suggest the usual C-language /* and */ .

Should comments be nestable? I suggest they should be, though I can see the argument against.
snibgo's IM pages: im.snibgo.com
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Comments in v7?

Post by glennrp »

snibgo wrote:As v7 has a slightly more formal scripting language, can I submit a mild request for comments? IM would ignore all characters between an open-comment and close-comment token. This could be useful during script development, to temporarily remove code, as well as allowing human-readable comments.

For the comment tokens, I suggest the usual C-language /* and */ .

Should comments be nestable? I suggest they should be, though I can see the argument against.
I like open-comment=#, close-comment=end-of-line as well.
I don't see a need for nested comments; they aren't allowed in C and could be error-prone. If you really need
to nest comments you could do something like this, if we accept both kinds of comments:

Code: Select all

    # Super-duper redeye reduction script
    begin
    do this
    do more
    #
    #  /* experimental */
    #  bad code
    #
    do more
    end
Post Reply