static void Main(string[] args) { Function.AddDirective("paste", Paste); Function.AddReplaceFunction("plot", CreatePlot); Calculator.IntermediateResultProduced += new IntermediateResult(IntermediatResultProduced); string input = ""; Console.ForegroundColor = ConsoleColor.White; Console.WriteLine("Enter MP expressions to process. Type 'paste' to use text from the Clipboard.\r\nType 'exit' to quit."); Console.ForegroundColor = ConsoleColor.Gray; while (true) { Console.Write(">> "); input = Console.ReadLine(); if (input.Trim().ToLower() == "exit") { break; } Token result = Calculator.ProcessCommand(input); DisplayResult(result); } }