Perşembe

Arrays by reference

I have been using lots of functions to create and check my variables and arrays lately. Along these lines, I thought I would take some time to share how the concept of "passing values by reference" works.
Basically, if you are anything like me you are always passing functions values and then having that function "return" a value. While there is nothing wrong with this approach, there is often an easier way to work with values in functions. Besides making values "global", you can also pass a function a value by reference.
Here is the standard way most people would work with a value in a function and then collect the functions return value.

Hiç yorum yok:

Yorum Gönder