JESS Userfunction writes "BS" instead of "/home" to a file

I'm using JESS for my expert system implementation and I have a userfunction. It writes some strings to a text file.

public Value call(ValueVector vv, Context context) throws JessException {

    Rete engine = context.getEngine();      
    int size = vv.size();

    for(i = 0; i < size-1; i++)
        params[i] = vv.get(i+1).stringValue(context); 

    engine.eval("(printout file " + params[2] + ")");
return new Value(params[1], RU.STRING);

params[2] has /home/username/folder as content. When it prints out to a file I get the following in the file. BS has black background btw.


I'm not sure what's going on here. Any ideas?

In addition, I've never had this problem when I print out from JESS code.


The unquoted text /home/ is being parsed as a regular expression; the printed value is somewhat unpredictable. You need to include double quotes in your built-up command so the path is seen as a quoted string.

Need Your Help

JavaScript & IE7 - Why won't my *.onload = function() { } fire?

javascript xhtml internet-explorer-7

I have a gallery I quickly coded up for a small site, and under Firefox 3 and Safari 3 works fine. But when I test on my old best friend IE7, it seems to not fire the imageVar.onload = function() {...