Skip to content

Exception when custom function name contains "let" #31

Description

@BrianMacIntosh

This exception is thrown when parsing an expression containing a custom function that contains the substring 'let'.

Call stack:
` mscorlib.dll!string.Substring(int startIndex, int length) Unknown

MathParser.dll!Mathos.Parser.MathParser.ProgrammaticallyParse(string mathExpression, bool correctExpression, bool identifyComments) Line 319 C#
MathParserTest.exe!Mathos.Parser.Test.Program.Main(string[] args) Line 16 C#
`

Test code:
MathParser parser = new MathParser(); parser.LocalFunctions.Add("notlet", (inputs) => inputs[0]); Console.WriteLine(parser.ProgrammaticallyParse("1 + notlet(2)"));

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions