473,396 Members | 1,792 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

MATHS EVALUATOR


hi

I TRY to find easy to use evaluator of string like this (4*100)+(0.2*5)
where the answer is 401. I tried several from codeproject (mcalc and other
but without sucess). Does someone know a place where i can find this ?
the operator are always + - * / no more functions are needed.

thanks for help
pascal

http://www.scalpa.info
Apr 2 '07 #1
4 1820
Pascal wrote:
I TRY to find easy to use evaluator of string like this (4*100)+(0.2*5)
where the answer is 401. I tried several from codeproject (mcalc and other
but without sucess). Does someone know a place where i can find this ?
the operator are always + - * / no more functions are needed.

IMO, MTParser - by Mathieu Jacques - is the best:

http://www.codeproject.com/cpp/MathieuMathParser.asp
However, it does much more than you require.

Marco / iw2nzm
Apr 2 '07 #2
Whoah it seems to be good !!! But Can I use it under vb 2005 express ! I
tried to add a reference to MTParserCOM.dll and i get an error message the
first time and when i tried again it worked..... Now every thing goes
right..... Thanks a lot for this link !!!
pascal
Apr 3 '07 #3
Pascal wrote:
I TRY to find easy to use evaluator of string like this
(4*100)+(0.2*5) where the answer is 401. I tried several from
codeproject (mcalc and other but without sucess). Does someone know a
place where i can find this ? the operator are always + - * / no
more functions are needed.
If you want to write it yourself, the algorithm is described in
http://en.wikipedia.org/wiki/Shunting_yard_algorithm

Andrew
Apr 3 '07 #4
hi Andrew
thanks for the link, it's interesting but i am not able to deal with the
code...
pascal
Apr 8 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: None | last post by:
JavaScript interpreter/evaluator class? Does anyone know of a way to parse JavaScript expressions in Java? I am working on a report writer and one of the requirements is a formula facility. ...
0
by: Hyden Zeng | last post by:
Hi everyone, I am optimizing an XPath query evaluator. currently, need to convert the DOM based one into a SAX based one. Anyone come across such an xpath evaluator before? Thank you. Hyden
0
by: Vanish92 | last post by:
I created a dll to evaluate a home-grown data type. I added an entry in the autoexp.dat pointing to my dll for the data type. When I try to debug it (_Debug compile), I have the expression...
1
by: Faraz | last post by:
Hi everyone, I am developing a WinForms application and I need a Math Expression validator, not an expression evaluator. So I want to be able to say... if ((sales - tax) > 20) THEN (x * y *...
0
by: Faraz | last post by:
Hi everyone, I am developing a WinForms application and I need a Math Expression validator, not an expression evaluator. So I want to be able to say... if ((sales - tax) > 20) THEN (x * y *...
2
by: Faraz | last post by:
Thanks Dave, To repeat the question: I am developing a WinForms application and I need a Math Expression validator, not an expression evaluator. So I want to be able to say... if ((sales - tax)...
1
by: Brian Gideon | last post by:
All, I'm looking for an expression evaluator to use in .NET and I was hoping someone could point me to a free library. Google's not playing nice on this one. I wrote my own, but if there is...
0
by: palani12kumar | last post by:
I had some problem regarding creating an expression evaluator using C. i've have not got an clear idea about the "expression Evaluator". Can you please tell me, what's an expression evaluator? and...
1
by: kadono | last post by:
I'm attempting to write some code to make all the tags in my webapp lowercase. Currently I'm using a regex pattern with a match evaluator to do this, but it's not working and gives me some strange...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.