Fantastic, this also solves another conundrum. Amibroker really is quite 
something. 

Many thanks

DJ


From: Tomasz Janeczko 
  To: [email protected] 
  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: [email protected] 
    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

   

Reply via email to