Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#3 Consult / Include other source files

open
nobody
4
2012-09-16
2005-01-29
Anonymous
No

Generally, a Prolog programmer wants to develop a set of related prolog
files for the same project in a single directory, which can be different from
the JLog directory. Therefore, if we can set the working directory inside
JLog with some command like "cd", that would be great. This is quite
necessary if one of my file F1 consults another file F2.pl in the same
directory. Currently, when I use the "Open KB" tool in JLog to load file F1,
which contains the line ":- ['F2.pl']" in the same directory, JLog fails to
consult 'F2.pl' as a side effect of consulting F1. Does JLog look for F2.pl in
the wrong directory?

Discussion

  • Glendon Holst
    Glendon Holst
    2005-01-29

    Logged In: YES
    user_id=436806

    JLog doesn't currently support the consult/1 predicate (the :- ['F2.pl'] is just a
    short-hand for consult).

    As a work-around, open each file from the open file dialog (it should remember the
    last directory), and then consult all of them (Consult All, in menu).