Running a script until [quit]
I'm making a simple calculator. It does what it should do, but only one line. Now I'd like to expand it so it runs until the user writes quit, or similar.
I run the methods handling to calculator from a method called statment(). The brilliant method I scrabbled together starts an infinite loop...
If anyone could give a hint on how to get the script to run one row at the time after each other.
//code opening input and
boolean runStatus = true;
map.put("ans",expression()); //expression() calculates one statement given by user.
System.out.println("Ans: " + map.get("ans"));
runStatus = false;
System.out.println("Syntaxerror! Expected EOL not: "+st.toString());