I think Nathan Gilbert wrote:
> Hello, 
> 
> I am relatively new with jess, (have been working with
> for about a month) I have read through the majority of
> the documentation on the jess language and I haven't
> been able to locate a way to save files in binary. Can
> anyone give me a suggestion? 
> 

There's no way to do this in the Jess language alone, but it's easy to
use Java APIs directly from Jess. For example:

Jess> (bind ?os (new java.io.FileOutputStream "/tmp/binfile"))
<External-Address:java.io.FileOutputStream>
Jess> (?os write 1)
Jess> (?os write 2)
Jess> (?os write 3)
Jess> (?os close)
Jess> (exit)
% od -b /tmp/binfile
0000000 001 002 003
0000003
%




---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        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