Page 1 of 1
Can i add comments within the command ?
Posted: 2013-12-12T04:42:26-07:00
by Frank1000
Hi,
can i add comments into the command line (Win) ? Something like this :
convert ^
-size 600x300 ^
# comment text here ^
xc:none ^
empty3.png
I tried rem, // and # but is not possible within the command itself.
Regards,
Frank
Re: Can i add comments within the command ?
Posted: 2013-12-12T11:05:18-07:00
by fmw42
I do not believe that is possible in IM 6
Re: Can i add comments within the command ?
Posted: 2013-12-12T11:37:15-07:00
by snibgo
No, IM doesn't currently have a syntax for comments. I have asked for this:
viewtopic.php?f=2&t=23593&p=100107 If you add your voice to the request, it is more likely to be implemented.
Re: Can i add comments within the command ?
Posted: 2013-12-12T11:54:57-07:00
by fmw42
Best I can suggest is to do what snibgo usually does and put one command on each line of code
convert image ^
command1 ^
command2 ^
...
result
Then what I do is put a line by line set of comments above it to explain what each line of code does.
I usually don't break things up that much, but I do make my lines shorter as significant to the functions being done and put a new parenthesis set of commands on at least one new line, if not break them up and use tabs to offset them logically.
Re: Can i add comments within the command ?
Posted: 2013-12-12T12:11:25-07:00
by Frank1000
fmw42 wrote:convert image ^
command1 ^
command2 ^
...
result
ok, so as far as i understand it can't be done this way :
convert image ^
#comment here
command1 ^
#comment here
command2 ^
...
result
instead :
# command here
convert image ^
command1 ^
command2 ^
...
result
# command here
pls let me know if not correct.
Re: Can i add comments within the command ?
Posted: 2013-12-12T13:22:21-07:00
by fmw42
That is correct. Best to do
# line1: does this
# line2: does that
# line3: does something else
...
convert image ^
command1 ^
command2 ^
...
result
Re: Can i add comments within the command ?
Posted: 2013-12-12T13:30:43-07:00
by Frank1000
ya that's a good idea, thx
Re: Can i add comments within the command ?
Posted: 2013-12-12T13:35:58-07:00
by snibgo
However, the prefix for comments in Windows is "rem" or "::", not "#".
Re: Can i add comments within the command ?
Posted: 2013-12-12T13:36:54-07:00
by Frank1000
ok thx
Re: Can i add comments within the command ?
Posted: 2013-12-12T13:41:01-07:00
by fmw42
snibgo wrote:However, the prefix for comments in Windows is "rem" or "::", not "#".
Thanks. I am on unix and gave mixed information -- windows line endings, but unix comments. Sorry, snibgo is correct.