callbyreferenceWord下载.docx

上传人:b****1 文档编号:812453 上传时间:2023-04-29 格式:DOCX 页数:11 大小:15.23KB
下载 相关 举报
callbyreferenceWord下载.docx_第1页
第1页 / 共11页
callbyreferenceWord下载.docx_第2页
第2页 / 共11页
callbyreferenceWord下载.docx_第3页
第3页 / 共11页
callbyreferenceWord下载.docx_第4页
第4页 / 共11页
callbyreferenceWord下载.docx_第5页
第5页 / 共11页
callbyreferenceWord下载.docx_第6页
第6页 / 共11页
callbyreferenceWord下载.docx_第7页
第7页 / 共11页
callbyreferenceWord下载.docx_第8页
第8页 / 共11页
callbyreferenceWord下载.docx_第9页
第9页 / 共11页
callbyreferenceWord下载.docx_第10页
第10页 / 共11页
callbyreferenceWord下载.docx_第11页
第11页 / 共11页
亲,该文档总共11页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

callbyreferenceWord下载.docx

《callbyreferenceWord下载.docx》由会员分享,可在线阅读,更多相关《callbyreferenceWord下载.docx(11页珍藏版)》请在冰点文库上搜索。

callbyreferenceWord下载.docx

Clause3:

(that=tasks)youmightwantafunctiontoperform.

Analysis:

S+V:

Themechanismisnot

C:

Q:

E:

Themechanismisnotsufficient

Thecall-by-valuemechanismisnotsufficient

Thecall-by-valuemechanismisnotsufficientforalltasks

weused

that(=mechanism)weused

that(=mechanism)weuseduntilnow

youmightwant

youmightwantafunction

(that=tasks)youmightwantafunctiontoperform.

Finaltranslation:

TOP

Forexample,onecommontaskforafunctionistoobtainaninputvaluefromtheuserandsetthevalueofanargumentvariabletothisinputvalue.

onecommontaskis

onecommontaskforafunctionis

onecommontaskforafunctionistoobtainandset

onecommontaskforafunctionistoobtainaninputvalueandset

onecommontaskforafunctionistoobtainaninputvaluefromtheuserandset

onecommontaskforafunctionistoobtainaninputvaluefromtheuserandsetthevalueofanargumentvariable

onecommontaskforafunctionistoobtainaninputvaluefromtheuserandsetthevalueofanargumentvariabletothisinputvalue.

Forexample,onecommontaskforafunctionistoobtainaninputvaluefromtheuserandsetthevalueofanargumentvariabletothisinputvalue.

Withthecall-by-valueformalparametersthatwehaveuseduntilnow,acorrespondingargumentinafunctioncallcanbeavariable,butthefunctiontakesonlythevalueofthevariableanddoesnotchangethevariableinanyway.

Withthecall-by-valueformalparametersacorrespondingargumentinafunctioncallcanbeavariable,

that(=call-by-value_formal_parameters)wehaveuseduntilnow,

butthefunctiontakesonlythevalueofthevariableanddoesnotchangethevariableinanyway.

acorrespondingargumentcanbe

acorrespondingargumentcanbeavariable,

acorrespondingargumentinafunctioncallcanbeavariable,

Withthecall-by-valueformalparametersacorrespondingargumentinafunctioncallcanbeavariable,

wehaveused

that(=call-by-value_formal_parameters)wehaveused

that(=call-by-value_formal_parameters)wehaveuseduntilnow,

butthefunctiontakesanddoesnotchange

butthefunctiontakesonlythevalueanddoesnotchange

butthefunctiontakesonlythevalueofthevariableanddoesnotchange

butthefunctiontakesonlythevalueofthevariableanddoesnotchangethevariable

butthefunctiontakesonlythevalueofthevariableanddoesnotchangethevariableinanyway.

Withacall-by-valueformalparameteronlythevalueoftheargumentissubstitutedfortheformalparameter.

AissubstitutedforB的意思是A被用來取代B。

(主動語氣的說法是substituteAforB)

onlythevalueissubstituted

onlythevalueissubstitutedfortheformalparameter.

onlythevalueoftheargumentissubstitutedfortheformalparameter.

Withacall-by-valueformalparameteronlythevalueoftheargumentissubstitutedfortheformalparameter.

Foraninputfunction,youwantthevariable(notthevalueofthevariable)tobesubstitutedfortheformalparameter.

youwant

youwantthevariable

youwantthevariabletobesubstituted

youwantthevariabletobesubstitutedfortheformalparameter.

youwantthevariable(notthevalueofthevariable)tobesubstitutedfortheformalparameter.

Foraninputfunction,youwantthevariable(notthevalueofthevariable)tobesubstitutedfortheformalparameter.

Thecall-by-referencemechanismworksinjustthisway.

Themechanismworks

Thecall-by-referencemechanismworks

Thecall-by-referencemechanismworksinthisway.

Thecall-by-referencemechanismworksinjustthisway.

Withacall-by-referenceformalparameter,thecorrespondingargumentinafunctioncallmustbeavariable,andthisargumentvariableissubstitutedfortheformalparameter.

Withacall-by-referenceformalparameter,thecorrespondingargumentinafunctioncallmustbeavariable,

andthisargumentvariableissubstitutedfortheformalparameter.

thecorrespondingargumentmustbe

thecorrespondingargumentinafunctioncallmustbe

thecorrespondingargumentinafunctioncallmustbeavariable,

Withacall-by-referenceformalparameter,thecorrespondingargumentinafunctioncallmustbeavariable,

andthisargumentvariableissubstituted

andthisargumentvariableissubstitutedfortheformalparameter.

Itisalmostasiftheargumentvariablewereliterallycopiedintothebodyofthefunctiondefinitioninplaceoftheformalparameter.

Itisalmost(sth=as_if...)

asiftheargumentvariablewereliterallycopiedintothebodyofthefunctiondefinitioninplaceoftheformalparameter.

Itis

Itis(sth=as_if...)

asiftheargumentvariablewerecopied

asiftheargumentvariablewerecopiedintothebody

asiftheargumentvariablewerecopiedintothebodyofthefunctiondefinition

asiftheargumentvariablewerecopiedintothebodyofthefunctiondefinitioninplaceoftheformalparameter.

asiftheargumentvariablewereliterallycopiedintothebodyofthefunctiondefinitioninplaceoftheformalparameter.

Aftertheargumentissubstitutedin,thecodeinthefunctionbodyisexecutedandcanchangethevalueoftheargumentvariable.

Aftertheargumentissubstitutedin,

thecodeinthefunctionbodyisexecutedandcanchangethevalueoftheargumentvariable.

Aftertheargumentissubstituted

Aftertheargumentissubstitutedin,

thecodeisexecutedandcanchange

thecodeinthefunctionbodyisexecutedandcanchange

thecodeinthefunctionbodyisexecutedandcanchangethevalue

thecodeinthefunctionbodyisexecutedandcanchangethevalueoftheargumentvariable.

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 总结汇报 > 学习总结

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2