[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Settings etc. (Re: consult/1 overrides dynamic predicate declaration
Re: Settings etc. (Re: consult/1 overrides dynamic predicate declarations?)
Mon, 28 Oct 2002 22:20:46 +0100
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826
Anyway, my user-supplied file is less and less readable and declarative.
I thought about asking the user to set things this way:
I would go for just a simple
OK. but I would like the user to be able to enter/modify the settings
from the top-level too, hence the call in the setting file.
Does someone have a solution for using a nice setting file (the user can
do whatever he wants in this file, in addition of providing some setting
Why not write a simple loop in your program, reading terms from the file?
That's how I implement data files. For simple facts, you just assertz()
the term you get from the file.
If you want to allow user-defined predicates or something, you may have to
inspect the term more closely before acting on it (if read() understands
the :- at all, I don't know).
yes, it does. but I don't know how to handle directive predicates. The
best would be to just do consult/1.
Timo, you should better do like me, like that we'd be two to be bothered