Hi,

That's not a bug, it's a feature (really!) What the while loop does is
arrange to have the enclosde code execute once if reading from a file,
or forever if reading from stdin. The variable (a member, not a local)
is reset outside the loop so that if you call execute a second time
after calling it to read from a file, it will read from stdin that
second time. In the various example programs, jess.Console and
jess.ConsoleApplet make use of this behaviour; if you startthem to
read a file, they will keep running after reading the file. The
default behaviour of jess.Main itself, though, is to read the file,
then exit. Otherwise it would be difficult to use Jess in "batch mode."

I think S.S.Ozsariyildiz wrote:
> 
> 
> Hi Ernest,
> 
> Last time i pointed a possible but we couldn't able to define what it was.
> Finally I had time to look at the code in Main.java. In the command line,
> if there is an argument such as "xxx.clp" (doesn't matter what it can be
> any file) the line 83 sets m_readStdin = false; That's fine however, in the
> execute method that cause the while-loop to exit. The variable  is set true
> in the line 203 but that's out of the while loop. So it never returns to
> read stdin text field in the loop. Simplly jess reads the file than
> executes it and exits the jess program.
> 
> regards S.S. Ozsariyildiz
> 

---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9214                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to