Prolog Tutorial 1
2016-03-01 06:28
260 查看
Prolog is a logical language which can help us to check the relation among propositions.
First, we should write prolog in a file named xxxx.pl. Then after installing prolog, we can just type prolog in terminal to launch prolog.
To load the file that we wrote is quite simple. We can just write [“name.pl”]. in terminal. Then prolog will automatically load the file.
Then, let’s move to the next.
We can write
It means I like programming, I like C++, I like Microsoft. Attention, just like other programming languages, we should have a terminator at the end of a phase. In prolog, the terminator is a point ” . “. We have to add a point at the end of any instruction.
First, we should write prolog in a file named xxxx.pl. Then after installing prolog, we can just type prolog in terminal to launch prolog.
To load the file that we wrote is quite simple. We can just write [“name.pl”]. in terminal. Then prolog will automatically load the file.
Then, let’s move to the next.
We can write
likes(me, programming). likes(me, C++). likes(me, Microsoft).
It means I like programming, I like C++, I like Microsoft. Attention, just like other programming languages, we should have a terminator at the end of a phase. In prolog, the terminator is a point ” . “. We have to add a point at the end of any instruction.
相关文章推荐
- MVC之ActionFilterAttribute自定义属性
- 【Android】16.1 Android Service基本概念
- 【Android】16.0 第16章 自定义服务和系统服务—本章示例主界面
- 数组和广义表-第5章-《数据结构题集》习题解析-严蔚敏吴伟民版
- Writing file-写入文件
- C++ DirectX 游戏开发初级视频教程 22 资源下载链接
- Reading files-读取文件内容
- spark streaming 编程
- boost mpi send recv-vector<class>
- Java中final关键字用法总结
- Java中集合类用法总结
- spark streaming & storm
- Android应用的调试
- 如何记忆Android模拟器中的快捷键
- 反编译Android应用
- 我所理解的i++和++i
- Android中各种drawable的使用
- 机器学习能做什么
- 我与小娜(23):什么是“暗物质“?
- Maximum Likelihood(ML) 和 Maximum a posterior(MAP)的直观理解