I am getting an error message when executing this code (through a JSP page):
Interpreter intr = new TreeInterpreter(new JavaCCParserFactory());
Object x;
String s = "a = b*2.0;";
intr.defineVariable("b", new Double(10.0));
intr.interpret(new StringReader(s), "topLevel");
x = intr.getVariable("a");
out.println(x)
The message is:
javax.servlet.ServletException: L1, C5 (topLevel):
Bad type in multiplication
Can someone point out to me what I am doing wrong?
Thanks in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am getting an error message when executing this code (through a JSP page):
Interpreter intr = new TreeInterpreter(new JavaCCParserFactory());
Object x;
String s = "a = b*2.0;";
intr.defineVariable("b", new Double(10.0));
intr.interpret(new StringReader(s), "topLevel");
x = intr.getVariable("a");
out.println(x)
The message is:
javax.servlet.ServletException: L1, C5 (topLevel):
Bad type in multiplication
Can someone point out to me what I am doing wrong?
Thanks in advance.