java.lang.Object
org.matheclipse.parser.server.util.Console
A java console program to run the evaluator interactivly.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetFile()
Gets the file.interpreter
(String strEval) Evaluates the given string-expression and returns the result inOutputForm
.static void
The main method.void
printPrompt
(PrintStream out, String prompt) prints a prompt on the console but doesn't print a newline.readString
(PrintStream out) read a string from the console.readString
(PrintStream out, String prompt) read a string from the console.void
Sets the file.
-
Constructor Details
-
Console
public Console()Instantiates a new console.
-
-
Method Details
-
main
The main method.- Parameters:
args
- the arguments
-
interpreter
Evaluates the given string-expression and returns the result inOutputForm
.- Parameters:
strEval
- the str eval- Returns:
- the string
-
printPrompt
prints a prompt on the console but doesn't print a newline.- Parameters:
out
- the outprompt
- the prompt string to display
-
readString
read a string from the console. The string is terminated by a newline- Parameters:
out
- Description of Parameter- Returns:
- the input string (without the newline)
-
readString
read a string from the console. The string is terminated by a newline- Parameters:
out
- Description of Parameterprompt
- the prompt string to display- Returns:
- the input string (without the newline)
-
setFile
Sets the file.- Parameters:
file
- the new file
-
getFile
Gets the file.- Returns:
- the file with which the program was started or
null
-