next up previous
Next: Messages to the user Up: Dialog categories Previous: Dialog categories

Obtaining user input

prompt_read(Prompt_list, Term)
ask(Prompt_list,Input)

read1 :-
  prompt_read(['Enter a likes clause'],Clause).

read2(Name, Feeling) :- 
  ask(['How are you,', Name, ?],Feeling),
  write(Feeling).

  
Figure 1: Prompt dialog

  
Figure 2: Ask dialog

menu(Music) :-
 scroll_menu(['What music do you like ?'],
 ['Pop','Indie','Jazz','Metal','Punk',
 'Fusion','Classical','Reggae','Dance'],
 ['Jazz'], Music).

  
Figure 3: Dialog Menu

question1 :-
 yesno(['Is the moon green',?]).

question2 :-
  myesno(['Have you switched off the gas',?]).

  
Figure 4: The Modeless yes/no dialog

  
Figure 5: The Modal yes/no dialog


next up previous
Next: Messages to the user Up: Dialog categories Previous: Dialog categories

Omer F Rana
Mon Mar 17 12:45:35 GMT 1997