home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l210 / 1.ddi / EXAMPLES.ARC / CH14EX06.PRO < prev    next >
Encoding:
Text File  |  1988-06-21  |  754 b   |  25 lines

  1. /*
  2.    Turbo Prolog 2.0 Chapter 14, Example Program 6
  3.    
  4.    Copyright (c) 1986, 88 by Borland International, Inc
  5.    
  6. */
  7.    
  8. goal
  9.    dir("", "*.*", FileName),
  10.    file_str(FileName, TextStr),
  11.    str_len(TextStr, Len),
  12.    str_int(LenStr, Len),
  13.    concat("Size ", LenStr, StrSize),
  14.    InitPos = 3,
  15.    makewindow(1, 7, 7, "Edit Example", 3, 3, 20, 70),
  16.    edit(TextStr, OutStringArg, StrSize, FileName,
  17.        "After editing, press F10 or Esc to exit this editor",
  18.         InitPos, "prolog.err", 1, 1, 1, 1, RetPos, RetStatus),
  19.         
  20.    writef("edited text:\n\n%\n", OutStringarg),
  21.    writef("\ncursor position at exit = %", RetPos),
  22.    writef("\nexit with (1 or 0): % \n", RetStatus),
  23.    write("\n1 = Esc"),
  24.    write("\n0 = F10").
  25.