You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
4.4.5.15 Other Functions<br />
$FDIALOG Activate a dialog<br />
$FDIST Distance between points<br />
$FEOF Test for end-of-file<br />
$FERSEV Severity of error number<br />
$FERSTA Status of error number<br />
$FERTXT Text of error number<br />
$FGETDEF Get DEF file variable definition<br />
$FGETENV Get environment variable definition<br />
$FPAUSE Pause processing with optional message<br />
$FSORT Sort records from file or elements of sequence<br />
The $FDIALOG Function<br />
result=$FDIALOG(s1[,s2])<br />
Returns: String<br />
<strong>Virtual</strong> <strong>Machine</strong> Reference, Model Customization<br />
Simulation Macro Functions, Other Functions<br />
This function can activate a dialog that has been defined inside the model, or one that has been<br />
saved to a file on disk. The first s1 parameter is a string specifying the name of the dialog. The<br />
second s2 parameter is optional, and if present specifies the name of the external file that contains<br />
the dialog. The $FDIALOG function returns a text string, which is the label of the button<br />
that was pressed to close the dialog (e.g., “OK”).<br />
Each “control” in the dialog (e.g., check box, combo-box, etc) is associated with a macro variable<br />
when the dialog is created in QUEST. When the dialog is activated at run-time, each dialog<br />
control is initialized to an appropriate state based on the current setting of its associated macro<br />
variable. If a dialog control references a variable that has not yet been defined, a local variable is<br />
created and set to the default value defined within the dialog. When the dialog exits, the macro<br />
variables associated with each control take on whatever value the user may have entered. In<br />
cases where the user value's type is ambiguous, the dialog processor will try to maintain the same<br />
variable type on exit as there was on input. Strongly typing variables with the DECLAR macro<br />
command will ensure the correct return value (the dialog processor will issue a diagnostic and<br />
keep the dialog active if the wrong type of data is entered, for example text in a numeric field).<br />
Combo-box and Drop-list controls can optionally have a second associated variable that defines<br />
the set of valid choices. These variables must be initialized as arrays or sequences, and be set to<br />
appropriate values, before calling the $FDIALOG function.<br />
There are three button types in a dialog: OK, Cancel and Reset. Buttons with OK and Cancel<br />
types cause the dialog processor to return control to the macro. Reset type buttons do not return<br />
control to the macro; they instead reset the dialog controls to their initial values and keep the<br />
dialog active. OK type buttons return control with macro variables updated; Cancel type buttons<br />
return control with macro variables unchanged (but initialized if necessary). The $FDIALOG<br />
<strong>ICAM</strong> Technologies Corporation – Proprietary 201