ch14ex06.pro

来自「prolog,人工智能推理程序,运行环境prolog」· PRO 代码 · 共 25 行

PRO
25
字号
/*
   Turbo Prolog 2.0 Chapter 14, Example Program 6
   
   Copyright (c) 1986, 88 by Borland International, Inc
   
*/
   
goal
   dir("", "*.*", FileName),
   file_str(FileName, TextStr),
   str_len(TextStr, Len),
   str_int(LenStr, Len),
   concat("Size ", LenStr, StrSize),
   InitPos = 3,
   makewindow(1, 7, 7, "Edit Example", 3, 3, 20, 70),
   edit(TextStr, OutStringArg, StrSize, FileName,
       "After editing, press F10 or Esc to exit this editor",
        InitPos, "prolog.err", 1, 1, 1, 1, RetPos, RetStatus),
        
   writef("edited text:\n\n%\n", OutStringarg),
   writef("\ncursor position at exit = %", RetPos),
   writef("\nexit with (1 or 0): % \n", RetStatus),
   write("\n1 = Esc"),
   write("\n0 = F10").

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?