本文分析了一个applet,它能一步一步的对算术表达式求值。
This article examined an applet that has the ability to evaluate arithmetic expressions step by step.
利用栈完成算术表达式求值:从键盘或文件中输入算术表达式,计算其结果并显示。
Done using an arithmetic expression evaluation stack: file input from the keyboard or an arithmetic expression, calculate and display the results.
编写代码对算术表达式求值的经典方法由DonaldKnuth描述于1962年(请参阅参考资料)。
The classic approach to writing code to evaluate arithmetic expressions was described by Donald Knuth in 1962 (see Resources). Knuth Outlines three steps.
就如你可能猜想的那样,整数转换优先级用于定义表达式求值的规则。这些规则叫做整型提升和常用算术转换。
As you probably suspect, the integer conversion rank is used to define the rules for expression evaluation. Those rules are named the integer promotions and the usual arithmetic conversions.
就如你可能猜想的那样,整数转换优先级用于定义表达式求值的规则。这些规则叫做整型提升和常用算术转换。
As you probably suspect, the integer conversion rank is used to define the rules for expression evaluation. Those rules are named the integer promotions and the usual arithmetic conversions.
应用推荐