Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
7. Knowledge Specification Language 100<br />
Questions<br />
Menu Questions<br />
<strong>flex</strong> toolkit<br />
A question describes the manner in which some information is to be<br />
extracted from the user. The response is obtained either through one of<br />
<strong>flex</strong>’s standard answer mechanisms or a customized answer.<br />
A standard question comprises a question name, followed by some text to<br />
be displayed, followed by the type of question and an optional explanation<br />
indicated by the KSL keyword because.<br />
In a menu question, the user is presented with a collection of options, and is<br />
offered the choice of making either a single selection or multiple selections.<br />
The general formats of a menu question are as follows.<br />
question question_name<br />
text of question ;<br />
choose from menu items ;<br />
because explanation .<br />
question question_name<br />
text of question ;<br />
choose some of menu items .<br />
question question_name<br />
text of question ;<br />
choose one of menu items .<br />
An explanation (the because part) is optional in each case.<br />
The KSL keywords choose one of are for single selection menus, where<br />
the user must select just one item; the others are for multiple selection<br />
menus where the user can select any number of items.<br />
The user’s response to the question is stored in a global variable called<br />
question_name.<br />
Examples<br />
question choose_a_colour<br />
Select a colour ;<br />
choose one of red, green, yellow, blue, black,<br />
white .<br />
The text Select a colour will be displayed when the question is asked.<br />
In this case the user may select just one of the items displayed, and this<br />
selection will be stored as the current value of the global variable<br />
choose_a_colour.<br />
In the following example the user may select any number of the items