In this section, we want to share with you how to operate and manage the function of Prolog language.
First of all, you must install the Prolog program. You can got it in our e-learning ITS in www.websi.its-sby.edu/elearning as the guest. Or you can download it by google search typing "Download Prolog".
After all, you can start using this language. For example, following this steps:
1. Make some variable and the member of those variable in notepad.
2. Save as that variable, rename the name of the file by adding ".pl" in the end of the name.
3. Close the notepad and open the Prolog program.
4.Choose "File" and then click "Consult"
5. Then. start to fill in the dialogue box by writing all variable.
NB: - make sure you always state the "." or "dot" in the end of those sentences
- if you wanna know all the possible variable, use the ";" punctuation.
for example:
1. Put in the variable
- bunga(mawar).
- bunga(melati).
- buah(semangka).
- buah(mangga).
2. Save as by : "Latihan.pl"
3. Close notepad, open the Prolog program
4. Choose "file" and "consult"
5. Write "bunga(X), buah(Y).
6. to continue all possibility click ";" punctuation.
it's so easy right??. ^^
0 comments:
Posting Komentar