引用:
作者joe3970
我瞭解
call by address
call by value
call by value result
call by name
但call by result就不懂了
請問call by result是如何運作的呢?
上網找資料
有看沒有懂
call by result
2003年6月
資訊與通信術語辭典
名詞解釋:
和傳位址呼叫相似的一種參數的傳遞方式。在實施上每一個形式變數的資料結構可分為實際參數的儲存位址和內容(值)二部分,在副程式執行時可視為只對第二部份(實際參數值)做處理,於返回前才將第二部分的內容放到第一部份位址所指的實際參數內。
麻煩各位前輩們了 
|
call by result = the same as call by value, but copy the result back to
the parameter when return from function, yields similar
effect as call by address (different to call by address in
some cases with aliase
https://stackoverflow.com/questions...-result-example