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

  1. /*
  2.    Turbo Prolog 2.0 Chapter 16, Example Program 3
  3.    
  4.    Copyright (c) 1986, 88 by Borland International, Inc
  5.    
  6. */
  7. predicates
  8.   extend(string, string) 
  9.  
  10. clauses
  11.   extend(S,S):-concat(_,".pro",S), !.
  12.   extend(S,S1):-concat(S,".pro",S1).
  13.  
  14. goal
  15.         comline(X),   /* must be compiled to .exe to function correctly */
  16.     extend(X,X1),
  17.     file_str(X1,S),
  18.     makewindow(1,23,8,"EDITOR",0,0,25,80),
  19.     editmsg(S,S1,"","","",0,"",RET),
  20.     removewindow,
  21.     RET><1,!,
  22.     file_str(X1,S1).
  23.