[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NumericArrayRef and NumericArray ?



PureBytes Links

Trading Reference Links

This is new in TS y2k. You can pass arrays and
variables by value and by reference. It has saved me
hours of work (both current and future hours of work)
You will be able to relate to this example:

"Suppose you have a word processor that has a picture
editor, and you want to insert a picture into your
document. Now if you insert the picture by reference,
the document will use the original picture-file and
when you modify the picture in your document, the
original will be modified as well, same as when you
modify the original picture your document will show
the updates. 
When you add the picture by value, and you modify the
picture in the word processor the original picture
will remain unmodified, same the other way - so you
are actually creating a second copy of the picture in
your word processor."

The exact same applied to passing arrays and variables
when programming. What EasyLanguage allowed you to do
in ts4 was pass by value, so your functions were
creating (local) copies of the variables you had in
your main program (be it an indicator or a system).
Now you can have functions receive parameters by
reference, so functions can alter the values of arrays
and variables of the main program.
This will allow functions to return more than one
value! neat stuff...

H

--- Philippe Lhermie <philippe_lhermie@xxxxxxxxxxx>
wrote:
> Hi all,
> 
> What's the difference between a NumericArrayRef
> function input and a
> NumericArray one ?
> I checked in the Help and I don't understand what
> follows :
> What does "a numeric array being passed by
> reference" and "being passed by
> value" mean ?
> 
> 
> 
> 
> Rgds,
> Philippe
>
////////////////////////////////////////////////////////
> 
> philippe_lhermie@xxxxxxxxxxx
> 
>
///////////////////////////////////////////////////////
> 
>