4. Create the text that you want to combine on notepad, for example: the file ‘ntar.txt’ and ‘ntar2.txt’ that we can see below:
in order that the output file contain the terms in the first input file followed by the terms in the second, you must write some rules using predicate combine in notepad like the picture below:
After you write the program, you can consult it on SWI PROLOG then you can see how’s the output, like we can see below:
5. in order that we can reads that two text files term by term and each pair of corresponding terms output a messsage saying that they are the same or different, we must open two files that contain the same starting term and finished by end. Like we can see below this :
after that, we need to make a formula on notepad using predicare ‘compare’. Then, consult it on SWI PROLOG.
this is it, the output:
Thursday, November 26, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment