首页    期刊浏览 2024年12月01日 星期日
登录注册

文章基本信息

  • 标题:The Subtle and Counterintuitive Hazards of Non-Sequential Evaluation in Languages of the C Family
  • 本地全文:下载
  • 作者:Reed, Adam Victor ; Wasley, Knox B.
  • 期刊名称:Communications of the Association for Information Systems
  • 印刷版ISSN:1529-3181
  • 出版年度:2004
  • 卷号:13
  • 期号:1
  • 页码:34
  • 出版社:Association for Information Systems
  • 摘要:In the family of programming languages derived from the C programming language, the order of evaluation of expressions between sequence points is left undefined and may be counterintuitive. While most programmers assume that this lack of a defined order refers only to a lack of preference between left-to-right and right-to-left sequential evaluation, the standards actually permit, and language processors implement, a variety of non-sequential evaluation orders. In some cases, particularly those where expressions containing sequence points are combined without an intervening sequence point, computed results can be unanticipated, and can vary with different compilers for the same code. Yet these results fail to trigger any warning from compilers or syntax-checkers. Because languages of the C family dominate Information Systems curricula and new business application code, the risk that code in those languages may give incorrect results without any warning from automated tools presents significant hazards against the integrity of financial calculations. This article explains those hazards and outlines countermeasures.
国家哲学社会科学文献中心版权所有