home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l210 / 1.ddi / ANSWERS.ARC / ANS_170B.PRO < prev    next >
Encoding:
Prolog Source  |  1988-06-21  |  394 b   |  21 lines

  1. /*
  2.    Turbo Prolog 2.0, Answer to second Exercise on page 170.
  3.    
  4.    Copyright (c) 1986, 88 by Borland International, Inc
  5. */
  6.  
  7. Predicates
  8.    typewriter ( char )
  9.  
  10. Clauses
  11.  
  12.   typewriter('\13') :- !.
  13.   typewriter(Char) :-
  14.       write(Char) ,
  15.       readchar(C) ,      
  16.       typewriter(C).
  17. Goal
  18.    makewindow(1,2,3," Typewriter ",0,0,25,80) ,
  19.    readchar(Char) ,
  20.    typewriter(Char).
  21.