beautypg.com

How to use case statements in command files, How to use case statements in command files -5 – Gasboy CFN III Manager Manual V3.6 User Manual

Page 217

background image

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

Page 20-5

How to Use the IF Command

Advanced Command Files

LOOP

command1
command2

.
.
.
commandn
IF -[condition]
RETURN

The do . . . until form uses an IF with a negative statement and looks like this:

LOOP

command1
command2

.
.
.
commandn
IF -![condition]
RETURN

The while . . . do form uses an IF with a positive statement and looks like this:

IF -[condition]
BEGIN

LOOP
command1
command2
.
.
.
commandn
IF -[condition]
RETURN

END

How to Use Case Statements in Command Files

The command CASE, when used in a command file, allows the user to pick one command to
execute from a list of several. The maximum number of cases in a CASE statement is 99.

There are two forms of case statement. The first is:

CASE [-d] -p n1 n2

command1
command2
. . . .
commandn1
[default command]

This manual is related to the following products: