⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fig9_17.pl

📁 超多的prolog源代码 具体内容见压缩包里面的programs.txt
💻 PL
字号:
% Figure 9.17  Displaying a binary tree.


% show( Tree): display binary tree

show( Tree)  :-
  show2( Tree, 0).

% show2( Tree, Indent): display Tree indented by Indent

show2( nil, _).

show2( t( Left, X, Right), Indent)  :-
  Ind2 is Indent + 2,                 % Indentation of subtrees
  show2( Right, Ind2),                % Display right subtree
  tab( Indent), write( X), nl,        % Write root
  show2( Left, Ind2).                 % Display left subtree

⌨️ 快捷键说明

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