Skip to content

Operators and whitespace #17

Description

@napen123

This fails to parse, with System.FormatException: Input string was not in a correct format being thrown:

MathParserparser=newMathParser();parser.Operators.Add("λ",(left,right)=>Math.Pow(left,right));Assert.AreEqual(Math.Pow(3,2),parser.Parse("3λ2"));

However, if the last statement is changed to have whitespace in the expression, it parses correctly:

Assert.AreEqual(Math.Pow(3,2),parser.Parse("3 λ 2"));

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions