Provides a visual interface to view the progress of a script that includes a loop.
break [option] argument
Syntax: break no option
Unconditional exit from any loop. If argument = 1, also exit from the current script.
Syntax: break -b caption
Open the progress status dialog box with the caption caption. This dialog box includes a Cancel button. Click Cancel to break from the entire script.
Syntax: break -be caption
Open the progress status dialog box with the caption caption. This dialog box includes an End button. Click on the End button to break from the loop and continue the script after the loop.
Syntax: break -bm caption
Open the progress status dialog box with the caption caption. All other controls in the dialog box are hidden. Use this option to display the caption only.
Syntax: break -e
Close the progress status dialog box.The value of variable is converted to a percent using the min and max range set with the -r option. Before using this option, you must use either the -b or -be option to open the progress status dialog box. You must also use the -r option before using this option. This command option updates the progress status dialog box with the value of variable converted to a percent using the min and max range set with the -r option. For example, if min = 0 and max = 100 and the initial value of variable is 10, the percent completion display will start at 10%. n general, variable is initialized and incremented in the loop. For an example using the -p and -r options, see the Examples, below.
Syntax: break -p
This command option updates the progress status dialog box with the value of variable.
Syntax: break -r min nax
Set the range of values used in the percentage completion display in the progress status dialog box. Before using this option, you must use either the -b or -be option to open the progress status dialog box. Use this option before the -p option.
In the following script, if a zero value is encountered in the Book1_A dataset, the script displays an error message and breaks out of both the loop and the script. If a negative value is encountered, the script breaks out of the loop. In both instances, the reciprocal summ of all values is stored in myvar.
myvar = 0; loop (ii, 1, 10) { if (Book1_A[ii] == 0) { type -b "error"; break 1; } if (Book1_A[ii] < 0) break; myvar += (1 / Book1_A[ii]); }
The next script utilizes the progress status dialog box.
break -b This is the caption for the dialog box; break -r 50 100; // the range of values will be 50 - 100 for (ii = 50; ii <= 100; ii++) { break -p ii; // the current value is ii // Put your code here sec -p .1; // Delay to simulate executing code }; break -end; // done, close the dialog box
If (command), Exit (command), For (command), Loop (command), Repeat (command), Switch (command), Document -e (command)