Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are variables case-sensitive in exprtk?

Tags:

c++

exprtk

When I define an expression in my exprtk string, like

var x := sqrt(y);

and I try to add another variable

var X := 2*z;

do I get a conflict? Thanks in advance.

like image 797
Lucio Carlos Pimentel Paiva Avatar asked Aug 26 '16 14:08

Lucio Carlos Pimentel Paiva


2 Answers

As of March 2017, the author of exprtk has added support for case sensitive variables: https://github.com/ArashPartow/exprtk/blob/master/readme.txt#L4477

Just include #define exprtk_disable_caseinsensitivity and you are good to go!

like image 50
Constantin Mateescu Avatar answered Oct 05 '22 13:10

Constantin Mateescu


I just found the answer: variables defined within exprtk expressions are NOT case sensitive. In the example above you will get a conflict.

like image 37
Lucio Carlos Pimentel Paiva Avatar answered Oct 05 '22 13:10

Lucio Carlos Pimentel Paiva