[Mathlib-commitlog] SF.net SVN: mathlib:[597] JMathLib/trunk/src/jmathlib/ui/text/TextUI.java
Status: Beta
Brought to you by:
st_mueller
|
From: <st_...@us...> - 2008-12-31 18:01:21
|
Revision: 597
http://mathlib.svn.sourceforge.net/mathlib/?rev=597&view=rev
Author: st_mueller
Date: 2008-12-31 18:01:17 +0000 (Wed, 31 Dec 2008)
Log Message:
-----------
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/ui/text/TextUI.java
Modified: JMathLib/trunk/src/jmathlib/ui/text/TextUI.java
===================================================================
--- JMathLib/trunk/src/jmathlib/ui/text/TextUI.java 2008-12-31 17:53:17 UTC (rev 596)
+++ JMathLib/trunk/src/jmathlib/ui/text/TextUI.java 2008-12-31 18:01:17 UTC (rev 597)
@@ -28,8 +28,11 @@
interactiveMode = true;
functionCode = "";
exiting = false;
+
interpreter = new Interpreter(true, null);
interpreter.setOutputPanel(this);
+ interpreter.executeExpression("startup");
+
input = new DataInputStream(System.in);
}
@@ -46,15 +49,13 @@
public static void main(String[] args)
{
TextUI tui = new TextUI();
- if(args.length == 0)
- {
- tui.run();
- }
- else
+ if(args.length != 0)
{
String filename = args[0];
tui.interpretLine(filename);
}
+
+ tui.run();
}
public void close()
@@ -76,17 +77,10 @@
}
else
{
- if(line.equalsIgnoreCase("exit") || line.equalsIgnoreCase("quit"))
- {
- close();
- }
- else
- {
String answerString = interpreter.executeExpression(line);
displayText(answerString);
displayPrompt();
- }
}
}
else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|