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

高级语言中子程序的副作用
引用本文:操静涛. 高级语言中子程序的副作用[J]. 北京联合大学学报(自然科学版), 2002, 16(2): 60-62. DOI: 10.3969/j.issn.1005-0310.2002.02.012
作者姓名:操静涛
作者单位:北京联合大学,职业技术师范学院,北京,100011
摘    要:高级语言中子程序的副作用是指子程序(过程和函数)对全程量或非局部量的改变.在C语言子程序中由于使用了全局变量,或是使用了静态变量,或是使用了指针参数,从而产生副作用.分别分析了++、--运算符、函数参数的运算次序、逻辑表达式、赋值表达式的副作用.而Turbo PASCAL中,系统会自动对表达式中的函数运算次序进行优化,从而引发更复杂的副作用.

关 键 词:子程序  函数  副作用  全局变量  静态变量  指针参数  表达式
文章编号:1005-0310(2002)02-0060-03
修稿时间:2001-11-24

The Side-effect of the Subprogram
CAO Jing-tao. The Side-effect of the Subprogram[J]. Journal of Beijing Union University, 2002, 16(2): 60-62. DOI: 10.3969/j.issn.1005-0310.2002.02.012
Authors:CAO Jing-tao
Abstract:In advanced language program, the side effect of the subprogram is referred that the subprogram (procedure or function) change public variable or no local variable. The side effect of the subprogram is produced by using public variable, or static variable, or pointer parameter in C Program. And the side effects produced by ++ or -- operation symbol, the orders of operation in function parameters, logical expression, bind expression are analyzed. The side effect owing to the system can auto optimized the orders of function operation at expression in Turbo Pascal.
Keywords:subprogram  function  side effect  public variable  static variable  pointer parameter  expression
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

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