AnsweredAssumed Answered

vrf Why doesn't this populate the array correctly?

Question asked by VRFuser on Sep 14, 2007
"Claflin, Carrie" <> wrote:
> I've attached to program.  Basically, I'm just trying to step through
> an array and put a number in the second column.  To make the example
> simple I've hard coded it to one.  In stead of walking through the
> array and filling the second column with 1s as it goes, it seems to
> zero the entire array and only put a one in that specific element. 
> During the next step the previous 1 is gone (0
> out) and the next element is set.
> Thanks in advance for any help.  I must be missing a basic concept.

"a" is a local variable inside of your formula. Each time the formula is run you reset "a" to whatever you input to the terminal, losing whatever changes you previously made.

What you want to do is to use a scoped variable for your array- perhaps a global or alternately use the formula's "a" output to set a global dynamically.

The former is suggested so that you formula looks something like


of course when you do this there's probably no reason to use a global for the index since you are passing it through a pin anyhow.

Basically-- use local variable ( like the loop index ) for the array index and global variable for the array--- the opposite of what you have.


Stan Bischof  Agilent Technologies  707-577-3994

You are currently subscribed to vrf as: To subscribe please send an email to: "" with the word subscribe in the message body.
To unsubscribe send a blank email to "".
To send messages to this mailing list,  email "". 
If you need help with the mailing list send a message to "".
Search the "unofficial vrf archive" at "".
Search the Agilent vrf archive at "".