/// <summary> /// Default constructor. /// </summary> public ExpressionEval() { _exprEvalConfig = new ExpressionEvalConfig(); _exprScannerParser = new ExprScannerParser(_exprEvalConfig); _exprExecConfigurator = new ExprExecConfigurator(); _exprExecutor = new ExprExecutor(); // todo: passer directement dans le constructeur comme pour le scannerParser? _exprExecConfigurator.SetConfiguration(_exprEvalConfig); _exprExecutor.SetConfiguration(_exprEvalConfig); // default language is en/english SetLang(Language.En); // default double decimal separator _exprEvalConfig.SetDecimalAndFunctionSeparators(DecimalAndFunctionSeparators.Standard); _expressionData = null; }
/// <summary> /// Concerns both objects: double decimal separator /// and function call parameters separator /// 2 cases: /// -Standard: décimal separator is dot and parameters separator is comma. /// exp: 12.45 fct(a,b) /// /// -ExcelLike: décimal separator is comma and parameters separator is double-comma. /// exp: 12,45 fct(a;b) /// /// </summary> public void SetDecimalAndFunctionSeparators(DecimalAndFunctionSeparators doubleDecimalSeparator) { _exprEvalConfig.SetDecimalAndFunctionSeparators(doubleDecimalSeparator); }