期刊文献+

C语言特殊表达式的分析

The analysis to special expression on C program language
下载PDF
导出
摘要 通常表达式都是按照运算符的优先级来计算的:优先级高的先计算,优先级低的后计算.但当运算符类型增多后,对表达式的计算就不那么简单了.并且,对于一些较为特殊的表达式,按此方法来计算,其结果还会发生错误.而最低优先直接值法———分析表达式的新方法,应用于此类较为复杂的特殊表达式可充分体现其优越性,不仅计算准确而且计算速度快.最低优先直接值法,其实质是将一个表达式按优先级最低的运算符分为若干块.每块之间的运算相互独立,不存在优先级高低问题.若其中某块的值能决定整个表达式的值,则该表达式的运算可进一步简化. Generally speaking,the expression is calculated in priority level:the higher priority level is calculated first,and the lower is done later.When the operator type is increased,the calculation to the expression become difficult.Moreover,to some special expressions,the calculation in this way will result some mistakes.However,the Getting the Value Directly by the Lowest Priority Level(VDLPL)-a new method on analysing expressions,is able to show its advantage by analysing the sort of complex and special expression:Not only the result of calculation is precise,but also the calculated speed is very quickly.In fact,the VDLPL is to divide an expression into several pieces by the operator of the lowest priority level.The calculation is independent between every piece.Don't exist the problem of the operator's priority level.If some one piece can settle the value of the expression,the calculation of the expression will be more simple.
作者 郭磊
出处 《商丘师范学院学报》 CAS 2004年第5期81-83,共3页 Journal of Shangqiu Normal University
关键词 表达式 操作数 运算符 优先级 方向性 expression operand operator priority level directionality
  • 相关文献

参考文献5

  • 1谭浩强.C程序设计(第二版).北京:清华大学出版社,2002.
  • 2钱能.C++程序设计教程.北京:清华大学出版社,2001.
  • 3张基温.C++程序设计基础[M].北京:高等教育出版社,1999,8..
  • 4[5]陈火旺,刘春林,等.编译原理(第3版)[M].北京:国防工业出版社,2000.66-80.
  • 5吕映芝 张素琴 等.编译原理[M].北京:清华大学出版社,1999.236-267.

共引文献14

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部