Quickly evaluates several basic mathematical and function-based expressions.

ID: 334

See: Eval
				
					using uCalcSoftware;

var uc = new uCalc();
// Eval provides a direct way to compute results from strings.
Console.WriteLine(uc.Eval("1+1"));
Console.WriteLine(uc.Eval("5*(3+9)^2"));
Console.WriteLine(uc.Eval("Sqrt(16) + Sin(0)"));
Console.WriteLine(uc.Eval("Length('This is a test')"));
				
			
2
720
4
14
				
					#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   // Eval provides a direct way to compute results from strings.
   cout << uc.Eval("1+1") << endl;
   cout << uc.Eval("5*(3+9)^2") << endl;
   cout << uc.Eval("Sqrt(16) + Sin(0)") << endl;
   cout << uc.Eval("Length('This is a test')") << endl;
}
				
			
2
720
4
14
				
					Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      '// Eval provides a direct way to compute results from strings.
      Console.WriteLine(uc.Eval("1+1"))
      Console.WriteLine(uc.Eval("5*(3+9)^2"))
      Console.WriteLine(uc.Eval("Sqrt(16) + Sin(0)"))
      Console.WriteLine(uc.Eval("Length('This is a test')"))
   End Sub
End Module
				
			
2
720
4
14