[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hello all,
> 
> I'm having a bit of a problem implementing i/o routers in Jess.
> 

This is a peculiarity of the way "readline" works in immediate
mode. It's not limited to the applet -- it happens in the GUI console
and in the command-line, too.

It's been discussed to death in the past so I don't want to repeat
that here, but basically, the first (readline t) in a program isn't
going to work right if you're typing in code for immediate
execution. If you put your code into a file and run it as the input to
the program -- using "java jess.Main <filename>" or "java jess.Console
<filename>" or the INPUT parameter to jess.ConsoleApplet -- then it
will work fine.

What's happening is that the newline after the last bit of code you
type in before the (readline) gets returned as the (readline)'s
result. Note that only (readline) has this behavior. (read) works
as you'd expect even in immediate mode, because it ignores newlines.

I haven't thought about this issue in ages -- I'll see if I can fix it
for 6.1p6.

---------------------------------------------------------
Ernest Friedman-Hill  
Science and Engineering PSEs        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550         http://herzberg.ca.sandia.gov

--------------------------------------------------------------------
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]
--------------------------------------------------------------------

Reply via email to