LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why replace don't work?

Hey guys why replace is not working?
I know how to make it work. But, the procedure is to initialize the array before replacing. It does make sense that you cant replace, if it does not exist!Smiley Wink
But is there no other way?Smiley Surprised
----------------------------------------------------------------------------------
I have still not got what I love.....
0 Kudos
Message 1 of 8
(3,832 Views)

You aren't initializing anything...you input an array with no elements...Use the initialize array function for that anyways, instead of constant.

 

________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 2 of 8
(3,829 Views)
You can add elements to an empty array, but you cannot replace an element that doesn't exist.
Jim

LV 2020
Message 3 of 8
(3,824 Views)
I haven't seen your code, but I have to agree with Jim 🙂
0 Kudos
Message 4 of 8
(3,816 Views)
Hey also can I change the size of an array dynamically. i.e, run-time.
----------------------------------------------------------------------------------
I have still not got what I love.....
0 Kudos
Message 5 of 8
(3,805 Views)
Sorry got it.Smiley Very Happy
I will come up with some real problem!Smiley Wink
----------------------------------------------------------------------------------
I have still not got what I love.....
0 Kudos
Message 6 of 8
(3,800 Views)
Sure.  Look in the array palette.  You can add to an array, get an array subset, etc.
Jim

LV 2020
0 Kudos
Message 7 of 8
(3,799 Views)
Yes, using Insert into Array will resize your array. (if you just want to make the total length longer, and continue to replace items, you can basically insert another initialized array at the of the current one).
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 8 of 8
(3,797 Views)