首页 | 本学科首页   官方微博 | 高级检索  
     检索      

C语言特殊表达式的分析
引用本文:郭磊.C语言特殊表达式的分析[J].商丘师范学院学报,2004,20(5):81-83.
作者姓名:郭磊
作者单位:安阳师范学院,计算机科学系,河南,安阳,455000
摘    要:通常表达式都是按照运算符的优先级来计算的:优先级高的先计算,优先级低的后计算.但当运算符类型增多后,对表达式的计算就不那么简单了.并且,对于一些较为特殊的表达式,按此方法来计算,其结果还会发生错误.而最低优先直接值法——分析表达式的新方法,应用于此类较为复杂的特殊表达式可充分体现其优越性,不仅计算准确而且计算速度快.最低优先直接值法。其实质是将一个表达式按优先级最低的运算符分为若干块.每块之间的运算相互独立,不存在优先级高低问题.若其中某块的值能决定整个表达式的值,则该表达式的运算可进一步简化.

关 键 词:表达式  操作数  运算符  优先级  方向性
文章编号:1672-3600(2004)05-0081-03
修稿时间:2003年7月16日

The analysis to special expression on C program language
GUO Lei.The analysis to special expression on C program language[J].Journal of Shangqiu Teachers College,2004,20(5):81-83.
Authors:GUO Lei
Abstract: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.
Keywords:expression  operand  operator  priority level  directionality  
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号