Skip to content
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

Variable names not case sensitive #608

Closed
SebZar opened this issue Nov 25, 2022 · 1 comment · Fixed by #613
Closed

Variable names not case sensitive #608

SebZar opened this issue Nov 25, 2022 · 1 comment · Fixed by #613
Assignees
Labels
Milestone

Comments

@SebZar
Copy link

SebZar commented Nov 25, 2022

Hi,
I'm not sure it's a bug report or a enhancement request.

All formulars are parsed to lower case, but it would be nice to use case sensitive variable names.

Okay, result: 30

var processor = new xFunc.Maths.Processor();
var expr = processor.Parse("a + B");
var parameters = new xFunc.Maths.Expressions.Collections.ParameterCollection();
parameters.Add("a", 10);
parameters.Add("b", 20);
var bla = expr.Execute(parameters);

Not okay, result: null

var processor = new xFunc.Maths.Processor();
var expr = processor.Parse("a + B");
var parameters = new xFunc.Maths.Expressions.Collections.ParameterCollection();
parameters.Add("a", 10);
parameters.Add("B", 20);
var bla = expr.Execute(parameters);
@sys27 sys27 added the bug label Nov 30, 2022
@sys27
Copy link
Owner

sys27 commented Nov 30, 2022

Hi, it looks like a bug. Initially, it was implemented the following way: variable names are parsed case-sensitive, and other things are case-insensitive. Probably, it was broken by #236.

@sys27 sys27 self-assigned this Dec 10, 2022
@sys27 sys27 added this to the xFunc 4.2.0 milestone Dec 10, 2022
sys27 added a commit that referenced this issue Dec 13, 2022
sys27 added a commit that referenced this issue Dec 24, 2022
@sys27 sys27 closed this as completed in #613 Jan 5, 2023
sys27 added a commit that referenced this issue Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants