I think I was able to recreate your problem. I made a for loop with a
shift register that I initialized with an array constant of a cluster
constant
with 3 elements(2 numerics and 1 string). (This was supposed to represent
your six pieces of data.)
If the array cluster elements are active(like they would be if you inserted
a numeric constant into a cluster constant) those values will show up in
your final 1-d array.
You need to right click on the initialization array and do data
operations>>delete element
Now the array still has your six elements, but they are greyed out. Now the
for loop
shift register is initialized with the correct information but no data. If
the array isnt greyed
out, the data in the initialization array will be at the beginning of your
data file.
Hope
I understood your problem and this is helpful.
Mark
--
Mark Sowa, Ph.D.
marksowa@one.net
Sowa Engineering
w3.one.net/~marksowa
P.O.Box 531251
Cincinnati, OH 45253
Voice (513) 259-9682
Fax (513) 598-4203
P wrote in message
news:506500000008000000931E0000-986697009000@quiq.com...
> I am using a shift register to store an 1-d array of data to a file,
> but it always appends the initialized values to the start of the array
> and saves them too. why?
>
> I am using a shift register with a for loop to build up a 1-d array of
> data (up to 32 items, each item having 6 properties), then when the
> loop is done, save it to a file. i know that you can save it as a 2-d
> array, but i am loading it elsewhere as a 1-d array, and dont want to
> change too much code...
>
> when i load the file, i notice that at the front of the data list,
> there are 6 zeros (from the initialized shift register). I have
> initialized my shift register as an array of zeros. But, i dont want
> t
o save that, just clear the previous data stored in the left shift
> register, and then save the new items without any trace of the old
> information being appended to my file.