制作手动计算器 [英] Making Manual Calculator
本文介绍了制作手动计算器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我想做一个人们可以用这种方式进行计算的计算器;
例如,您可以在文本框中输入以下内容:3 + 6/8 *(9 + 6-9 + 8 *(8 + 25))
我在执行此操作时应该遵循哪些方法?
有很多事情要考虑;
拆分()字符,运算符优先级等.
如果您有这样的项目代码,可以分享给我吗?
在此先感谢.
Hello everyone,
I want make a calculator in which people calculates in this way;
for example one can write in textbox like this : 3+6/8*(9+6-9+8*(8+25))
Which ways should i follow while doing this?
There are lots of things to be taken into account;
Split () caracters, operator precedence etc.
If you have a project code like this could you share me?
Thanks in advance.
推荐答案
要计算问题中指定的以string
形式给出的值计算,必须对expression
进行评估.在这方面,以下代码项目文章
用VB.NET编写的表达式评估器 [ ^ ]
数学/函数/布尔/字符串表达式评估器 [ ^ ]
可能会有所帮助.
To calculate the value calculation given in the form of astring
as specified in the question theexpression
has to be evaluated. In this regard the following Code Project articles
An expression evaluator written in VB.NET[^]
math / function / boolean /string expression evaluator[^]
may be helpful.
这篇关于制作手动计算器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文