Ahmed,
Define a fact section containing the required results.
Add before them constant header facts.
Code: Select all
domains
resdom : r(symbol,real)
facts - results
header(symbol,symbol,symbol).
dataline(positive,resdom).
clauses
header("experiment","identifier","yield").
Add the
dataline facts using
assertZ statements, and write the to a file by
statements.
You can evaluate the results.txt file by Excel. I recommend you to write an Excel macro in order to get rid the extra parentheses result from the
r() facts.
...
On the other hand, reading of files generated by a
single file:save statement by a singe
consult call is much easier than repeat...fail cycle with checking end-of-file before reading lines and parsing them. I can add to this that nowadays the consultable data files can contain blnk lines and comments. [The Turbo Prolog's original
consult reported error when the closing parenthesis of the last term was followed by an eof (code 26) character inserted by the Personal Editor.]