next up previous contents index
Next:   QUIT Up: The KEYBOARD INTERFACE: Command Previous:   PUBLICATION QUALITY


  QUESTION

The QUESTION command is used to add interactive input to a macro. Either the GUI or the ``keyboard'' interface may be used.

The following types of user input may be defined:

The user prompt is defined, as is an optional default value, and optional range checking. The entered value or values are stored in one or more program variables.

Clearly GRAPHICAL COORDINATE input will always come from the graphics window.

The following example shows the definition of a question to input an integer value from the user:

Main menu: ENTER COMMAND [Z-SCALE]:question
TYPE OF DATA VALUE TO DEFINE [INTEGER VALUE]:int
ENTER USER PROMPT FOR VALUE INPUT:ENTER NUMBER OF THE DAY OF THE MONTH
USE GRAPHICAL USER INTERFACE [YES]:yes
GIVE USER DEFAULT VALUE [YES]:yes
ENTER DEFAULT VALUE FOR INTEGER:1
RESTRICT INPUT VALUE RANGE [YES]:yes
LOWER LIMIT OF RANGE FOR INTEGER:1
UPPER LIMIT OF RANGE FOR INTEGER (Range: 1 to 2147483647):31
INFO: Enter help text or user escape (\\) to exit
TEXT:Enter an integer number between 1 and 31 for the number
TEXT:of the day of the month. 
TEXT:\\
ENTER VARIABLE NAME [#VALUE]:#DAY
 
NOTE: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
              INTERACTIVE INPUT REQUIRED FOR THE MACRO
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

After the #DAY is entered the GUI integer value window appears and will accept a valid integer between 1 and 31.


next up previous contents index
Next:   QUIT Up: The KEYBOARD INTERFACE: Command Previous:   PUBLICATION QUALITY
Andrew Hammersley
2004-01-09