beautypg.com

Prompt string, Prompt string -6 – Gasboy CFN III Manager Manual V3.6 User Manual

Page 218

background image

[P:]* TYPE TEST3.CMD

case -p 3 %1

shift1
shift2
shift3

[P:]*

Advanced Command Files

How to Use the IF Command

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

In the first form, with the -p switch, the number of the case selected is passed from the
command line. The n1 argument is the total number of cases. The n2 argument is the case to
execute.

If the optional -d switch is used, the number of cases is one greater than the number indicated
by n1. The last command, the default command, will be executed if none of the other cases
matches.

The second form of the case statement is:

CASE [-d] -e n1 text

command1
command2
. . . .
commandn1
[default command]

[P:]* TYPE TEST4.CMD

case -e 3 Shift (1-3):

shift1

shift2
shift3

[P:]*

In the second form, with the -e switch, the number of the case selected is entered by the user
from the data terminal or console. The n1 argument is the total number of cases. Text is
displayed on the command terminal or console. The user then enters the number of the case to
execute. If the user enters a number that is greater than n1, text is displayed again.

If the optional -d switch is used, the number of cases is one greater than the number indicated
by n1. With the -d option, if the user enters a number that is greater than n1, the default
command is executed, and text is not displayed again.

Prompt String

You can provide a prompt string for an IF or CASE command that follows a PAUSE
command. This prompt will be displayed if the user enters a response that is not accepted by
the program. You can use this second prompt to list the acceptable responses. Note that the
second prompt will not be printed if the -d switch is used with CASE.

PAUSE;AI Do you want to see files on drive A:? (Y/
N)
IF -y Type Y for yes, N for no:
dir a:

This manual is related to the following products: