MAD…..Math_C

We are NOT MAD! but we are Member At Discrete Math C….

  • Calendar

    Desember 2009
    S S R K J S M
    « Nov    
     123456
    78910111213
    14151617181920
    21222324252627
    28293031  
  • Arsip

  • Iklan

INPUT and OUTPUT in Prolog ch.3

Posted by madmathc pada Desember 22, 2009

This is the last post of this session….

(4) Example I make this file..

And the second file …

Next, type this rule… and save it in .pl

Consult it in Prolog. Then type this..

?-combine(‘in1.txt’,’in2.txt’,’out1.txt’).

The result is..

Just it? No, look at your computer. You will find file with name out1.txt. Open it and look…

(5) You can try to type this. Save it in test1.txt

Next type this and save in test2.txt

Type this rule and save it in compare.plThen, consult it in PROLOG. Next type this…

?-compare(‘test1.txt’,’test2.txt’).

Then the result is….

Finally, this chapter have finished. Thanx for coming… Don’t forget to give a comment.:-)

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

w

Connecting to %s

 
%d blogger menyukai ini: