Perhaps  something  along  this line (untested). Note you look forward
from  array2,  if  it  finds  a  4  four places ahead you substitute a
newvalue

Array2 = iif( ref( array1), 4) == 4, newvalue, Array2);

herman

> Hi All,

> I seem to have a hit a logic block... not sure why.
> Let's say I have the following array,

> 0 0 0 0 0 0 0 0 4 0 0 0 0 0

> Now, lets say when I see the number 4, I want to change the value
> in another array 4 elements back (yes, the number relates to the
> number of elements back I want to change in another array)...

> So, the other array goes from all zeros, to...

> 0 0 0 0 1 0 0 0 0 0 0 0 0 0

> I realize I can do this with looping... is there a simple way to do with 
> AFL...? (i.e. not looping)

> TIA



> ------------------------------------

> **** IMPORTANT PLEASE READ ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.

> TO GET TECHNICAL SUPPORT send an e-mail directly to 
> SUPPORT {at} amibroker.com

> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> http://www.amibroker.com/feedback/
> (submissions sent via other channels won't be considered)

> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/

> Yahoo! Groups Links




Reply via email to