早教吧作业答案频道 -->其他-->
算法导论算法导论英文版第二章2.1节关于伪代码的第八条我看的不是很懂敢问那位大侠翻译并解释一下以下是原文“Parametersarepassedtoaprocedurebyvalue:thecalledprocedurereceivesitsowncopy
题目详情
算法导论
算法导论 英文版 第二章 2.1节关于伪代码的第八条 我看的不是很懂 敢问那位大侠翻译并解释一下 以下是原文
“Parameters are passed to a procedure by value:the called procedure receives its own copy of the parameters,and if it assigns a value to a parameter,the change is not seen by the calling procedure.When objects are passed,the pointer to the data representing the object is copied,but the object's fields are not.For example,if x is a parameter of a called procedure,the assignment x ← y within the called procedure is not visible to the calling procedure.The assignment f [x] ← 3,however,is visible.”
算法导论 英文版 第二章 2.1节关于伪代码的第八条 我看的不是很懂 敢问那位大侠翻译并解释一下 以下是原文
“Parameters are passed to a procedure by value:the called procedure receives its own copy of the parameters,and if it assigns a value to a parameter,the change is not seen by the calling procedure.When objects are passed,the pointer to the data representing the object is copied,but the object's fields are not.For example,if x is a parameter of a called procedure,the assignment x ← y within the called procedure is not visible to the calling procedure.The assignment f [x] ← 3,however,is visible.”
▼优质解答
答案和解析
在一个过程中,参数通过值来传递:调用过程收到它自己其中的参数,如果参数被赋上一个值,这个变化对调用过程是不可见的.当对象被传递的时候,数据的指针代表了对象被复制,但是对象域却没有.例如,如果x是一个调用过程的参数,在调用过程内部把x赋值为y对于调用过程来说是不可见的.但是如果把f[x]这个数组赋值为3,就是能可见的.
水平有限..希望能有所帮助~
水平有限..希望能有所帮助~
看了算法导论算法导论英文版第二章2...的网友还看了以下:
方仲永如同常人的原因其一,从乡邻的角度;其二,从方仲永本人来看(用原文回答) 2020-04-26 …
方仲永泯然众人的原因:从邻乡的角度来看;从其父的角度来看;从方仲永的角度l来看.按原文回答(按原文 2020-06-05 …
这句的意思是什么:群燕低飞,碎泥落酒杯是一首诗里的句子我想知道这句是什么意思你们看了原文吗它出自俳 2020-06-20 …
请问一屋不扫何以扫天下这句话出自何处我记得以前还看过原文,主人公是李贺“徐孺下陈蕃之榻”所提及的陈 2020-07-02 …
死生契阔,于子成说,执子之手与子偕老,到底是战场兄弟情,还是战乱夫妻情?很久以前我听人讲过是说兄弟 2020-07-13 …
英语听力听不懂,是要看着原文听还是硬着头皮听 2020-07-15 …
Myfeetfeellikejelly此句何意?在一篇文章中看到,原文如下:NicoleConto 2020-07-16 …
听VOA听不懂,据说看着原文听效果不好,那看着翻译听可以吗?有什么更好的方法吗? 2020-11-03 …
新年好!新2第70课最后一句请各位前辈看下原文再指教itlookedonsympatheticall 2020-11-24 …
练英语听力训练方法本人用voa和新概念3练听力,一般都是先看看文本再把文本放一边开始听,别人说这样先 2020-11-26 …