home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / prolog / library / prolo_c / exampl41.pro < prev    next >
Text File  |  1986-10-06  |  613b  |  25 lines

  1. /* Program 41 */
  2. /*
  3.   Use <Ctrl><Break> to end this program
  4. */
  5.  
  6. predicates
  7.     piano
  8.     tone(char,integer)
  9.  
  10. goal
  11.     write("Use <Ctrl><Break>\nto end this program\nPlay\n     w e  t y u\n"),
  12.     write("    a s d f g h j k"),
  13.     piano.
  14.  
  15. clauses
  16.     piano:-
  17.         readchar(Note),tone(Note,Freq),sound(5,Freq),piano.
  18.  
  19.     tone('a',131).  tone('w',139).  tone('s',147).
  20.     tone('d',165).  tone('e',156).  tone('f',175).
  21.     tone('t',185).  tone('g',196).  tone('y',208).
  22.     tone('h',220).  tone('u',233).  tone('j',247).
  23.     tone('k',262).
  24.     tone(_,18000).   /*all other keys squeak*/
  25.