Prompt
General Operation Statement
The Prompt function pauses the simulation and displays either a message and input field or a menu for selecting a choice. The value entered or selected is then assigned to the designated variable, array element, or attribute. To have Prompt present a menu, specify one or more choices as in the second following syntax example. The value already in the variable, array element, or attribute is used as the default value in the dialog box. One use of Prompt is to give the simulation user the option to change the operation time represented by a variable during a simulation.
Syntax
Prompt <string expression>, <name>{,
<choice1>:<expression1>,
<choice2>:<expression2>,
<choice3>:<expression3>...}
Examples
Prompt "Enter the number of entities to process:", Var2
Prompt "Enter the size of batches to accumulate:",Var1, "Large": 20, "Medium": 15, "Small": 10
Parameters
<string expression>
The message to open. This expression should tell what value to enter or choose.
<name>
The name of the variable, array element, or attribute to give the value. The value originally in this item is used as the default value.
<choices
A string expression identifying the choice. Any number of choices may be specified, and all must have corresponding expressions.
<expressions>
The value to assign the variable, array element or attribute if the simulation user selects the corresponding choice from the menu.