beautypg.com

Comments in command files, How to use terminal input with command files – Gasboy CFN III Manager Manual V3.6 User Manual

Page 201

background image

MDE-4871 CFN III Manager’s Manual for Windows® XP Embedded - Version 3.6 · August 2010

Page 19-3

Comments in Command Files

Making Your Own Commands

Comments in Command Files

A line in a command file that begins with an asterisk (*) is a comment. A comment is usually
an informative note to yourself or to the next person who might edit the file; the note is usually
about the previous or next command in the file. The command interpreter ignores any line in a
command file that begins with an asterisk.

If the very first character in the whole command file is an asterisk, it has a special meaning.
When the first character is an asterisk, the lines in the command file are not printed on the
command terminal when that command file is executed. So, if you are having problems with a
command file, removing the first asterisk can be useful in debugging.

If the first character is not an asterisk, all the lines in the command file, including comment
lines, are printed on the command terminal when the file is executed. Except when you are
testing your command files, you almost always want an asterisk as the first character.

If a line in a command file has a backquote (‘) as its last character, the command may be
continued on the next line. This is useful for echo strings that are too long to fit in 80 columns.

How to Use Terminal Input with Command Files

To have a command in a command file print prompts and take input from the terminal, you can
use the T (terminal) option with that command in the command file. The T option disables
redirection for that command and causes the command to prompt for all input from the
terminal instead of taking input from the file. Any other output from the command will also be
printed on the terminal.

[P:]* TYPE NEWSHIFT.CMD

stop
* stop halts any new transactions
* from starting until shift change
* is completed
load shift;t
print totals;at
run
* run resumes operations after
stop

[P:]*

This manual is related to the following products: