AngouriMath

Navigation

← Back to list of members

ExplicitParsingOnly

 Property

Summary

Determine if it should only parse if it is explicit

Example

using System;
using AngouriMath;
using AngouriMath.Core.Exceptions;
using static AngouriMath.MathS;

Entity expr = "a2 + 2x + a b + 2(g + e)3";
Console.WriteLine(expr);
using var _ = Settings.ExplicitParsingOnly.Set(true);
try
{
    Entity expr2 = "a2 + 2x + a b + 2(g + e)3";
    Console.WriteLine(expr2);
}
catch (MissingOperatorParseException)
{
    Entity expr3 = "a^2 + 2*x + a * b + 2*(g + e)^3";
    Console.WriteLine($"Exception, but we still can parse {expr3}");
}

Prints
a ^ 2 + 2 * x + a * b + 2 * (g + e) ^ 3
Exception, but we still can parse a ^ 2 + 2 * x + a * b + 2 * (g + e) ^ 3

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 1534 pages online