首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到19条相似文献,搜索用时 515 毫秒
1.
在C语言中,函数是实现程序模块化设计思想的手段.函数在调用过程中常常存在着实参和形参之间的数据传递.文章阐述了调用函数的过程中实参和形参之间数据传递的实质和属性,即值传递和单向性.  相似文献   

2.
黄夕倪 《福建电脑》2008,24(7):192-193
对C++语言中实参和形参之间数据传递的规律和函数的返回值进行了分析,并给出给出了一些函数的编写技巧.  相似文献   

3.
金兰 《福建电脑》2013,29(3):15-16
C语言函数调用时,函数实参与形参之间是如何进行参数传递以及它们的值如何发生变化。各种类型的数据作为函数参数,函数参数传递的过程与规律也不尽相同。本文以局部变量的概念为基础,采用内存图示分析法,剖析了三种情况下C语言函数参数传递的过程以及函数实参和形参值的变化过程。  相似文献   

4.
六、过程与函数作为参数前面我们已经介绍了过程和函数的基本概念以及它们的调用方法,阐明了过程或函数都能通过数值形参或变量形参来完成信息的传递,即由调用语句将信息传递给被调用的过程或函数,或者由过程或函数将信息返回给调用它的语句。然而有时会遇到这样的情况,我们想传递给过程或函数的信息不是一般的数据,而是某一段程序,更确切地说,想传递的信息本身也是一个过程或函数。例如,为了计算一个定积分,希望编写一个较通用的求积分的程序,使它对不同的被积函数均能求积分,这就要求在求积分的程序段中把  相似文献   

5.
函数及其调用过程中的参数传递规律一直是C语言教学中的重点和难点,针对很多教材中给出的实参向形参传递过程的值传递及地址传递规律,从分析变量、常量等基本概念的本质出发,阐释了栈结构在函数参数传递过程中的作用,证实了“值传递”是函数唯一的参数传递方式,而不存在所谓的“地址传递”方式的结论,并通过指针、数组、结构体类型实参到形参的传递过程,进一步说明了C函数的参数传递过程受到参数数据类型制约的特点.  相似文献   

6.
在C语言程序设计中,函数功能程序块的调用总是涉及到实参传递到形参、本文着重讨论它的这一传递过程,帮助读者了解C语言函数间、C语言与无形参说明的汇编子程序间的参数传递方式,了解同为内部变量的形参与内部变量的区别。参数的传递就是实现实参传送的存储单元必须是形参定义的存储单元。对C语言来说,作为形参的内部变量是堆栈变量,只有确定堆栈地址之后内部变量存储单元的地址才能具体化,这就强调实参传送的地址必须与该函数的栈联系起来。一、实参的传送一个函数中调用另一个函数时,程序控制就从调用函数中转移到被调用函数,转移时将实参和返回地  相似文献   

7.
主程序或其他调用子程序的程序块称为“调用程序”。在调用子程序时,调用程序的实参要和被调用的子程序的形参之间进行数据传递,这种数据传递被称为“虚实结合”,因为形参又称为“虚拟参数”。  相似文献   

8.
函数是C++程序设计教学的重要部分,利用函数定义选定的形参可以是基本类型变量或对象、引用形式、指针变量或数组三种形式,因此对应函数参数传递的方法有传值法、传引用法以及传地址法.通过对函数定义和函数参数传递方法的分析,结合教学实际设计容易理解适用于理论课和上机实训课的教学过程,并做出相应的教学提示,归纳总结函数编程时参数选择的方法和教学体会.  相似文献   

9.
正确地理解和使用指针是成功地进行C语言程序设计的关键。指针不仅提供了函数修改调用变元的方法.还支持动态分配内存,因此可以改善某些例程的效率。但同时,指针也是C语言最强也是最危险的特征之一,未初始化的指针(包含无效值的指针)可以使系统崩溃。因此在很多C语言参考书中,都要求初始化的指针作为函数形参,即形参指向一个特定数据类型的变量。  相似文献   

10.
在C/C++语言中,函数可以带参数,也可以不带参数,还可以带数目不定的参数。本文介绍如何编制形参个数不定的函数及其使用。  相似文献   

11.
In this paper I discuss a famous argument for physicalism – which some authors indeed regard as the only argument for it – the overdetermination argument. In fact it is an argument that does not establish that all the entities in the world are physical, but that all those events that enter into causal transactions with the physical world are physical. As mental events seem to cause changes in the physical world, the mind is one of those things that fall within the scope of the argument. Here I analyze one response to the overdetermination argument that has acquired some popularity lately, and which consists in saying that what mental events cause are not physical effects. I try to show that recent attempts to develop this response are not successful, but that there may be a coherent way of doing so. I also try to show that there seems to be a philosophical niche in which this way might fit.  相似文献   

12.
This paper presents a new take on how argument dependencies in natural language are established and constrained. The paper starts with a rather standard view that (quantificational) argument dependencies are operator-variable dependencies. The interesting twist the paper offers is to eliminate the need for syntax that serves to enforce what the operator-variable dependencies are. Instead the role of ensuring grammatical and generally unambiguous forms is taken up by semantics imposing what are dependency requirements for any interpretation to go through at evaluation time. With this viewpoint there emerges an essential need for localities as the hiding of (embedded) expression material, together with a (limited) form of garbage collection to release grammatical resources used in the current locality for reuse in subsequent localities.  相似文献   

13.
《Artificial Intelligence》2007,171(10-15):922-937
We present a novel approach to machine learning, called ABML (argumentation based ML). This approach combines machine learning from examples with concepts from the field of argumentation. The idea is to provide expert's arguments, or reasons, for some of the learning examples. We require that the theory induced from the examples explains the examples in terms of the given reasons. Thus arguments constrain the combinatorial search among possible hypotheses, and also direct the search towards hypotheses that are more comprehensible in the light of expert's background knowledge. In this paper we realize the idea of ABML as rule learning. We implement ABCN2, an argument-based extension of the CN2 rule learning algorithm, conduct experiments and analyze its performance in comparison with the original CN2 algorithm.  相似文献   

14.
本文结合计算机网络的原理,着重分析了构造网络环境的软技术。  相似文献   

15.
在总结了一些解决大惯性、大纯滞对象在启动、结束或大幅度增减给定值时出现的较大超调量问题的方法的基础上,提出了一种相对变系数PID控制算法.该算法可以有效地解决超调量过大问题,适度提高其他解决方案所牺牲的快速性,并且在给定量突变范围大的系统中有一致的调节品质.通过MATLAB对比仿真验证其有效性.  相似文献   

16.
In this paper I shall discuss the notion of argument, and the importanceof argument in AI and Law. I shall distinguish four areas where argument hasbeen applied: in modelling legal reasoning based on cases; in thepresentation and explanation of results from a rule based legal informationsystem; in the resolution of normative conflict and problems ofnon-monotonicity; and as a basis for dialogue games to support the modellingof the process of argument. The study of argument is held to offer prospectsof real progress in the field of AI and law, and the purpose of this paperis to provide an overview of work, and the connection between the various strands.  相似文献   

17.
Persuasion and Value in Legal Argument   总被引:2,自引:0,他引:2  
  相似文献   

18.
The principle of functional invariance states that it is a natural law that conscious beings with the same functional organization have the same quality of conscious experience. A group of arguments in support of this principle are rejected, on the grounds that they establish at most only the weaker intra-subjective principle that any two stages in the life of a single conscious being that duplicate one another in terms of functional organization also duplicate one another in terms of quality of phenomenal experience.
Michael PelczarEmail:
  相似文献   

19.
事件抽取是自动内容抽取(Automatic Content Extraction,ACE)会议评测的任务之一,事件要素识别是事件抽取的一个子任务。分析了事件抽取和事件要素识别的研究现状,提出了一种基于特征加权的事件要素识别算法(Feature Weighting Based Event Argument Identification,FWEAI)。该算法首先对分类算法中的ReliefF特征选择算法进行改进,将其应用于聚类算法中。改进的ReliefF算法(FWA)根据各个特征对聚类的不同贡献分配不同的权值,然后采用KMeans算法对事件要素进行聚类。实验结果表明,FWEAI算法可以提高事件要素识别的准确率。  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

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