※ 引述《tinlans.bbs@whshs.cs.nccu.edu.tw (汀)》之銘言:
: ※ 引述《meltice.bbs@bbs.wretch.cc (三億兩千萬大散戶)》之銘言:
: > 我到覺得以C++來說
: > foo(int *) , by address
: 這個叫做 by value(有人稱之 pointers as call-by-value parameters),
: 至於 reference 和 address 是一樣的東西...
: 外國的名書不太可能對這種寫法說成 call by address,
: 說這是 call by address 的其實都是中文書...
: 那只能說是一場誤會,要怪可能就要怪中文書都亂寫。
外國人, 也很有人稱為那是
call-by-adress (pass-by-address) (非正式說法).
http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=166&rl=1
In C, the only way to achieve this is by passing the argument's address
to the callee.
This passing mechanism is traditionally called pass by address.
http://www.math.concordia.ab.ca/~marinova/ courses/cmpt111/Lectures
/Handouts4/12Functionshand4.pdf
The C language does not have a true pass by reference –
it is simulated. by what we call pass by address
--
※ Origin: 鳥窩 (BirdNest.twbbs.org) ◆ From: 220-134-61-5.HINET-IP.hinet.net