[Mathlib-commitlog] SF.net SVN: mathlib:[616] JMathLib/trunk/src/jmathlib/core/interpreter/ GlobalV
Status: Beta
Brought to you by:
st_mueller
|
From: <st_...@us...> - 2009-01-05 15:01:00
|
Revision: 616
http://mathlib.svn.sourceforge.net/mathlib/?rev=616&view=rev
Author: st_mueller
Date: 2009-01-05 15:00:55 +0000 (Mon, 05 Jan 2009)
Log Message:
-----------
changed handling of global variables
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/core/interpreter/GlobalValues.java
Modified: JMathLib/trunk/src/jmathlib/core/interpreter/GlobalValues.java
===================================================================
--- JMathLib/trunk/src/jmathlib/core/interpreter/GlobalValues.java 2009-01-05 15:00:37 UTC (rev 615)
+++ JMathLib/trunk/src/jmathlib/core/interpreter/GlobalValues.java 2009-01-05 15:00:55 UTC (rev 616)
@@ -8,6 +8,7 @@
import java.text.NumberFormat;
import jmathlib.core.interpreter.Interpreter;
+import jmathlib.core.tokens.OperandToken;
/**This class contains the global variables, which are accessible throughout the program.
These include
@@ -70,9 +71,9 @@
}
/**@return the current variable list*/
- protected VariableList getVariables()
+ protected VariableList getLocalVariables()
{
- return contextList.getVariables();
+ return contextList.getLocalVariables();
}
/**@return the global variable list*/
@@ -81,12 +82,24 @@
return contextList.getGlobalVariables();
}
- /**@return the global variable list*/
+ /**@return the a variable from local or global workspace*/
protected Variable getVariable(String name)
{
return contextList.getVariable(name);
}
+ /** create a variable in the local or global workspace*/
+ protected Variable createVariable(String name)
+ {
+ return contextList.createVariable(name);
+ }
+
+ /** create a variable in the local or global workspace*/
+ protected void setVariable(String name, OperandToken value)
+ {
+ contextList.setVariable(name, value);
+ }
+
/**Change the current context to point to the new Variable List
@param _Variables = the new list of Variables to use*/
protected void createContext(VariableList _variables)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|