ReleaseMethod
Releases an
Item defined with
Define or other related function
Example 1: Displaying a different result for each value of x based on the expression parsed with Parse
Dim VariableX = uc.DefineVariable("x")
Dim Expression As string
Console.Write("Enter an expression (Ex: x^2 * 10): ")
Expression = Console.ReadLine()
Dim ParsedExpr = uc.Parse(Expression)
Dim x As double
for x = 1 To 10
VariableX.SetVariableValue(x)
Console.WriteLine("x = " + x + " Result = " + ParsedExpr.Evaluate())
Next
ParsedExpr.Release()
VariableX.Release()
var VariableX = uc.DefineVariable("x");
string Expression;
Console.Write("Enter an expression (Ex: x^2 * 10): ");
Expression = Console.ReadLine();
var ParsedExpr = uc.Parse(Expression);
for (double x = 1; x <= 10; x = x + 1) {
VariableX.SetVariableValue(x);
Console.WriteLine("x = " + x + " Result = " + ParsedExpr.Evaluate());
}
ParsedExpr.Release();
VariableX.Release();
Write('Enter an expression (Ex: x^2 * 10): ')
Expression = ReadLn();
for x := 1 to 10 do
begin
VariableX.SetVariableValue(x);
WriteLn('x = ' + x + ' Result = ' + ParsedExpr.Evaluate());
End;
ParsedExpr.Release();
VariableX.Release();
auto VariableX = uc.DefineVariable("x");
string Expression;
cout << "Enter an expression (Ex: x^2 * 10): " << endl;
cin >> Expression;
auto ParsedExpr = uc.Parse(Expression);
for (double x = 1; x <= 10; x = x + 1) {
VariableX.SetVariableValue(x);
cout << "x = " << x << " Result = " << ParsedExpr.Evaluate() << endl;
}
ParsedExpr.Release();
VariableX.Release();
auto VariableX = uc.DefineVariable("x");
string ^ Expression;
Console::Write("Enter an expression (Ex: x^2 * 10): ");
Expression = Console::ReadLine();
auto ParsedExpr = uc.Parse(Expression);
for (double x = 1; x <= 10; x = x + 1) {
VariableX.SetVariableValue(x);
Console::WriteLine("x = " + x + " Result = " + ParsedExpr.Evaluate());
}
ParsedExpr.Release();
VariableX.Release();