To start turbo prolog ,you must have first setup turbo prolog on your computer.you can download turbo prolog from here.
After download you have to setup.Then For starting with turbo prolog go to your run option and write the following command or just click turbo prolog icon.
Then you will see a interface like below and on this you have to write a program.To write a program open the following interface and click “alt f” button for selecting menu of that interface,then write program code and save then compile & run.After run the program you have to give Goal and finally you will see the output.
Basic Coding Structure Of Turbo Prolog Program:
1. Domains —>control the types of object(6 objects)
2. Predicates –>Relation of the clauses is defined in this section.
3.Clauses –>Express the fact
Six Types of object in turbo Prolog:
- char:enclosed between single quotation
- integer: Range -3276 to 32767
- real: Floating point number 1e^307 to1e^308
- string: enclosed between double quotation
- symbol: sequence of letter starting with case letters.
- file type.
Here is a simple Turbo Prolog Program Code:
/* programm start here*/
/*program end here */
Here is a another program that that can add odd number
/* Programm start here*/
/* end of program here*/
[Note:] More Interesting things are waiting to publish.So stay connected with us.