Are program annotations possible?

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
jalbt51
Junior Coder
Posts: 31
Joined: Sat Mar 06, 2004 4:40 pm

Are program annotations possible?

Post by jalbt51 » Wed Mar 31, 2004 7:46 pm

Is it possible to write comments and explanations right next to a program that will not mess up the running of the program-that macrosched will ignore, but that I can read- so that months later I can quickly pick up the reasoning and working of the program?
If this has already been dealt with elsewhere, please direct me to that explanation.

Lumumba

Post by Lumumba » Wed Mar 31, 2004 9:29 pm

You need same line comments, like this ... ?

Run Program>cmd /c dir > c:\dir.txt /* Well I ever want to know whats going on on my C:Drive*/

I guess no, but this should work:

// Well I ever want to know whats going on on my C:Drive !
Run Program>cmd /c dir > c:\dir.txt

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Mar 31, 2004 10:56 pm

From the Help file:
Remark>Some Comment

The remark statement is ignored by the interpreter. It exists simply to allow comments to be placed in the code. In fact, any text that is not a recognised command can be used for this purpose.
Lumumba's example shows what has typically been accepted as a "normal" comment notation.
//.............................................................;This is another comment example, offset to the right

But the important thing is that NO commenting can be on the same line. Even an extra space at the end of a line may cause unexpected results.

There is no feature for Block Comments, but that would be a good suggestion for including in a newer version. Maybe use /* and */ which are common in other script languages. Something like this:
/* This is the beginning
of a few lines of comments.
using Block Comment symbols to identify the range. */
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Thu Apr 01, 2004 3:48 pm

Bob,

It's my understanding that any illegal statements are treated automatically as comments/remarks in Macro Scheduler script. Of course, same line commenting isn't supported.

Happy scripting.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Apr 02, 2004 12:56 am

We are in total agreement, armsys. That is essentially what this portion of the quoted Help file means:
In fact, any text that is not a recognised command can be used for this purpose.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Fri Apr 02, 2004 2:04 pm

Bob,

Sorry for my oversight.

Happy scripting.

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts