Java Class Hello

import jekpro.tools.api.Interpreter;

/**
* <p>Java code for the hello argument example.</p>
* <p>Without thorough exception handling.</p>
*
* @author Copyright 2010-2013, XLOG Technologies GmbH, Switzerland
* @version Jekejeke Prolog 0.9.0 (a fast and small prolog interpreter)
*/
public class Hello {

/**
* <p>Hello the argument.</p>
*
* @param inter The interpreter.
* @param arg The argument.
*/
public static void hello(Interpreter inter, String arg) {
try {
Writer wr = (Writer)((TermRef)inter.getProperty(
ToolkitLibrary.PROP_SYS_CUR_OUTPUT)).getValue();
wr.write("Hello ");
wr.write(arg);
wr.write('\n');
wr.flush();
} catch (IOException x) {
/* */
}
}

}

Comments