New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser throws error when defining a function in a multiline expression #405

josdejong opened this Issue Jul 11, 2015 · 2 comments


None yet
2 participants

josdejong commented Jul 11, 2015

The following works fine:

var scope = {};
math.eval('f(x) = x^2', scope);
scope.f(3); // 9

but when having a multiline expression containing a function definition, we get an error:

var scope = {};
math.eval('a=2; f(x) = x^a', scope);  
    // Uncaught SyntaxError: missing ) after argument list

This comment has been minimized.


josdejong commented Jul 12, 2015

This has been fixed in v1.7.1


This comment has been minimized.


FSMaxB commented Jul 12, 2015


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