PureBytes Links
Trading Reference Links
|
Fantastic, this also solves another conundrum. Amibroker really is quite something.
Many thanks
DJ
From: Tomasz Janeczko
To: amibroker@xxxxxxxxxxxxxxx
Sent: Thursday, December 21, 2006 7:51 PM
Subject: Re: [amibroker] Procedure Help Please
Hello,
Variables are passed by VALUE, not by reference hence changes made inside the formula
do not affect them.
If you want to return one value use a function.
If you want your procedure to update many variables, pass the NAMES of the variables instead
and use VarSet() function inside procedure to set the values of the variables defined externally.
Note that you should make sure that your procedure does not define local variables of the same name
because local variables will then "cover" visibility of global ones.
http://www.amibroker.com/f?varset
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: David Jennings
To: amibroker@xxxxxxxxxxxxxxx
Sent: Thursday, December 21, 2006 8:09 PM
Subject: [amibroker] Procedure Help Please
I have a procedure with 4 input arrays e.g.
Procedure ABCD(A,B,C,D);
{
ABCD updated here ...
}
Within the procedure, I update A, B, C, & D.
How do I ensure I get the updated values when I reference them in the code after the procedure is called.
Many Thanks
DJ
Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.26/594 - Release Date: 12/20/2006 3:54 PM
|