| View previous topic :: View next topic |
| Author |
Message |
JDN
Joined: 24 Mar 2004 Posts: 135
|
Posted: Fri Nov 23, 2007 2:08 pm Post subject: Multi Line Comments |
|
|
Does anyone know of a way to write comments containg multiple lines without having to insert a semicolon into each line?
I'd like to be able to write comments containing one or more paragraphs. It seems to me there should be a simple way to do this that I'm just missing due to a lack of sleep. Does anyne know of something obvious that I'm missing?
I like to have a few different versions of commands in my AHK script files and be able to turn one version on or off at will. I had hought of disabling some of the commands and enablling others but sometimes problems in the syntax of disapbed commands prevent the ehtire script file from bieing able to be compiled. |
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 1186 Location: switzerland
|
Posted: Fri Nov 23, 2007 2:52 pm Post subject: |
|
|
examples, first remark, second example goto/ gosub to label AA2
( post in ask for help )
| Code: | /*
this is remark1
this is remark2
*/
|
| Code: | AA2:
msgbox,this is label AA2
return
|
|
|
| Back to top |
|
 |
JDN
Joined: 24 Mar 2004 Posts: 135
|
Posted: Fri Nov 23, 2007 4:18 pm Post subject: |
|
|
Thanks very much Gary. I must have missed where that feature was documented.
But I'm afraid I don't understand your second example. Does this show how to take a working piece of code and effectively convert it into a comment by enclosing it using an invalid label?
If so, there is a problem with multiple comments because when you load the definition file, it gives you a warning message for each such label.
But perhaps I'm not understanding your intent. |
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 1186 Location: switzerland
|
Posted: Fri Nov 23, 2007 4:31 pm Post subject: |
|
|
sorry , I can't good english
second example is only to jump here
I was thinking you can use to test different commands / part of scripts
when use a gLabel you get error or when you goto a label which don't exist
but no error in this case when you never need these labels
| Code: | A:=1
if A=1
goto,SKIP01
else
goto,SKIP02
return
SKIP01:
msgbox,you skipped to 1 because A=1
return
SKIP02:
msgbox,you skipped to 2 because A<>1
return
|
|
|
| Back to top |
|
 |
|