Check out the "open" function:
http://www.jessrules.com/jess/docs/71/functions.html#open
Here's an example of what it would look like:
(open myfile "output.txt")
(printout myfile " My message " ?*var1* "with variable to say.."
crlf)
You just open a file, then write to it.
On Feb 11, 2009, at 7:09 AM, Jonatas Barros Falcao wrote:
Hi friends,
I developped a expert system based on jess, but I need to generate my
informations from screen (by printout command) to file. Example:
<Jess code>
.
defglobal ?*var1* = " **in file** ")
.
defrule...
(printout t " My message " ?*var1* "with variable to say.." crlf)
I need that the message above says in .txt file and open the .txt
file then
output as follows:
-------- Test.txt ------
My Message ** in file** with variable to say...
The question is: Is possible to create it ?? If possible a example
for me
please ?
Thanks for advance,
Jônatas Falcão
ITA - Instituto Tecnologico de Aeronautica
CTA - Comando Geral de Tecnologia Aerospacial
SJC - Campo Montenegro
Sao Paulo - Brasil
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users
[email protected]'
in the BODY of a message to [email protected], NOT to the list
(use your own address!) List problems? Notify [email protected]
.
--------------------------------------------------------------------
---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences Phone: (925) 294-2154
Sandia National Labs
PO Box 969, MS 9012 [email protected]
Livermore, CA 94550 http://www.jessrules.com
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [email protected]'
in the BODY of a message to [email protected], NOT to the list
(use your own address!) List problems? Notify [email protected].
--------------------------------------------------------------------