24.11.2014 Views

flex Expert System Toolkit - LPIS

flex Expert System Toolkit - LPIS

flex Expert System Toolkit - LPIS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

7. Knowledge Specification Language 102<br />

<strong>flex</strong> toolkit<br />

the question is being asked, or perhaps to give some help on answering the<br />

question.<br />

For example:<br />

Keyboard Input<br />

question choose_a_colour<br />

Select a colour ;<br />

choose one of colours ;<br />

because This colour will be used for text display.<br />

Users may be asked to enter information from the keyboard using the KSL<br />

keyword input. The type of the data expected may then be specified, as<br />

either name, number, integer or set.<br />

The general formats of a keyboard input question are as follows.<br />

question question_name<br />

text of question ;<br />

input datatype ;<br />

because explanation .<br />

question question_name<br />

text of question ;<br />

input variable<br />

such that condition(s) ;<br />

because explanation .<br />

As before, the because part is optional. The datatype may be<br />

name<br />

number<br />

integer<br />

set<br />

Examples<br />

question get_country<br />

Which country do you live in? ;<br />

input name .<br />

question number_of_children<br />

How many children do you have ? ;<br />

input integer .<br />

question room_width<br />

What is the width of the room (in metres)? ;<br />

input number .<br />

question child_names<br />

Please enter your children’s names ;<br />

input set .<br />

The input keyword may also be followed by some conditions which define

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!