[Mathlib-commitlog] SF.net SVN: mathlib:[780] JMathLib/trunk/src/jmathlib/core/interpreter
Status: Beta
Brought to you by:
st_mueller
|
From: <st_...@us...> - 2009-01-25 22:19:01
|
Revision: 780
http://mathlib.svn.sourceforge.net/mathlib/?rev=780&view=rev
Author: st_mueller
Date: 2009-01-25 22:18:57 +0000 (Sun, 25 Jan 2009)
Log Message:
-----------
changed signature of evaluate(Token[] operands)
to
evaluate(Token[] operands, GlobalValues globals)
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/core/interpreter/Interpreter.java
JMathLib/trunk/src/jmathlib/core/interpreter/Variable.java
Modified: JMathLib/trunk/src/jmathlib/core/interpreter/Interpreter.java
===================================================================
--- JMathLib/trunk/src/jmathlib/core/interpreter/Interpreter.java 2009-01-25 21:03:22 UTC (rev 779)
+++ JMathLib/trunk/src/jmathlib/core/interpreter/Interpreter.java 2009-01-25 22:18:57 UTC (rev 780)
@@ -54,6 +54,8 @@
// all expressions for access to function manager, variable lists, contexts,...
globals = new GlobalValues(this, runningStandalone, _applet);;
+ // set output panel to NULL
+ // ?? needed? outputPanel is initialized with NULl anyway (see above)
outputPanel = null;
// read preferences from a file on the disc or on the web
@@ -111,9 +113,7 @@
// if required rehash m-files
if(runningStandalone)
- {
globals.getFunctionManager().checkAndRehashTimeStamps();
- }
try
{
@@ -167,6 +167,7 @@
var.assign(new CharToken(answer));
}
+ ErrorLogger.debugLine("Interpreter: done");
return answer;
}
Modified: JMathLib/trunk/src/jmathlib/core/interpreter/Variable.java
===================================================================
--- JMathLib/trunk/src/jmathlib/core/interpreter/Variable.java 2009-01-25 21:03:22 UTC (rev 779)
+++ JMathLib/trunk/src/jmathlib/core/interpreter/Variable.java 2009-01-25 22:18:57 UTC (rev 780)
@@ -5,16 +5,16 @@
/**class for binding a variable name to some data*/
public class Variable extends RootObject
{
- /**The variable name*/
+ /**variable name*/
private String name;
- /**Variable data*/
+ /**variable data*/
private OperandToken data;
- // local or global context
+ /** local or global context */
private boolean globalB = false;
- /**Default constructor*/
+ /**default constructor*/
public Variable()
{
super();
@@ -22,7 +22,8 @@
data = null;
}
- /**constructor containing a variable name*/
+ /**constructor containing a variable name
+ * @param _name*/
public Variable(String _name)
{
super();
@@ -30,7 +31,9 @@
data = null;
}
- /**constructor containing the variables name and data*/
+ /**constructor containing the variables name and data
+ * @param _name
+ * @param _data*/
public Variable(String _name, OperandToken _data)
{
super();
@@ -51,8 +54,10 @@
//}
}
- /**Assign a new value to the variable*/
- //public OperandToken assign(Token _data)
+ /**Assign a new value to the variable
+ * @param _data
+ * @return
+ */
public OperandToken assign(OperandToken _data)
{
if (_data!=null)
@@ -86,9 +91,12 @@
return equal;
}
- /**Converts the variable to a string.*/
+ /**Converts the variable to a string.
+ * @return
+ */
public String toString()
{
+ //Errors.throwMathLibException("Variable");
if(data == null)
return null;
else
@@ -107,7 +115,9 @@
return name;
}
- /**Returns the variables data*/
+ /**Returns the variables data
+ * @return
+ */
public OperandToken getData()
{
return data;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|