This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]