Datamax v1.1x Printer User Manual


 
Copyright © 2007 • MCL Technologies • All Rights Reserved
www.mcl-collection.com
Chapter 5 : Using Processes
5.2.7. Test and Branch
General introduction The Test & Branch command allows you to set up a test and, depending
on the test result, branch to a specified screen or label.
Test and Branch To test a variable and branch upon a condition, proceed as follows:
1 Add the process Test and Branch to your label program
2 In the If Value box, select the variable you want to test or type
any text.
3 Determine if you want to make a String or Numeric comparison
4 Select the comparison criteria.
5 In the Value 2 box, select the variable against which you want to
test the variable selected in the first parameter. You may also type
any text here instead of selecting a variable.
6 In the Then Goto box, select a screen or action to go to if the
comparison is true.
7 In the Else Goto box, select a screen or action to go to if the
comparison is false.
8 Click OK
String or numeric? If you select String, the test will consider both values as ‘text' and
the operation will be purely a ‘text' field comparison.
Example: If the first variable contains 0002 and the second
variable contains 2, the result of the ‘is equal to' will be ‘False'.
If you select Numeric, the test will be done on numeric values.
Example: If the first variable contains 0002 and the second
variable contains 2, the result of the ‘is equal to' will be ‘True'.
October 2007 Page
142