ch22ex01.pro

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

PRO
25
字号
/*
   Turbo Prolog 2.0 Reference Guide Chapter 2,  Example Program 1
   
   Copyright (c) 1986, 88 by Borland International, Inc
   
*/
constants
  egagraphic = 1
/* Note that ifdef must start in column 1; don't indent it. */
ifdef egagraphic                    /* if egagrphic is defined, use this goal */

goal
  graphics(5, 1, 1),
  write("\nEga Graphics"),
  readchar(_).
/* Note that elsedef must also setart in column 1; don't indent it. */
elsedef                                        /* otherwise, use the next goal */

goal
  graphics(1, 1, 3),
  write("\nCga Graphics"),
  readchar(_).
/* Note that enddef must start in column 1 too; don't indent it */

enddef

⌨️ 快捷键说明

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