This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
re: Loading macros from java
- From: Andy Dwelly <andy dot dwelly at safedataco dot com>
- To: kawa at sourceware dot org
- Date: Thu, 22 Jun 2006 20:44:44 +0100
- Subject: re: Loading macros from java
Aha:
That seems to be it - the following snippet works
try {
Scheme.registerEnvironment();
Scheme scm = new Scheme();
Environment env = scm.getEnvironment();
Environment.setCurrent(env);
scm.eval("(load \"prequel.scm\")", env);
Object x = scm.eval("(iflte 10 10 (+ 3 4) (/ 10 0))", env);
System.out.println("x = " + x);
} catch (Throwable ex) {
ex.printStackTrace();
}
Thanks...