Call by reference, value, and name

前端 未结 5 866
陌清茗
陌清茗 2020-12-20 16:46

I\'m trying to understand the conceptual difference between call by reference, value, and name.

So I have the following pseudocode:

foo(a, b, c)
{
           


        
5条回答
  •  别那么骄傲
    2020-12-20 17:45

    By value - there is no changes out the function. all your actions vanish when the function finished.

    By reference - your actions indeed changes the variables. By name - I've never heard ...

    Passing x+1 is not change, just tells to the function 3 instead 2 or etc...

提交回复
热议问题