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

  1. /*
  2.    Turbo Prolog 2.0 Chapter 4, Example Program 5
  3.    
  4.    Copyright (c) 1986, 88 by Borland International, Inc
  5.    
  6. */
  7.    
  8. predicates
  9.   isletter(char)
  10.  
  11. clauses
  12. /* When applied to characters, '<=' means */
  13. /* "alphabetically precedes or is the same as" */
  14.   isletter(Ch) :- 'a' <= Ch, Ch <= 'z'.
  15.   isletter(Ch) :- 'A' <= Ch, Ch <= 'Z'.
  16.  
  17.