It might be marginally more efficient in terms of execution speed, yes.
However it makes the code slightly harder to write and read. There's little
in it either way.
Note the attachment that Enrique supplied isn't much better since the array
still has to grow dynamically. It could be adapted if your array will aways
be 30 elements; replace it with a FOR loop and the 30 element array will
transparently be pre-created and filled as the loop runs. Can't with the
while loop because Labview doesn't know how many times the loop will
iterate.
Alternatively, why bother with this arsing about? Just use "Spreadsheet
String to Array" and wire the correct datatype to the "type" input. You'll
then get probably the most efficient conversion you can get.
H
elper wrote in message
news:50650000000500000092530000-1007855737000@exchange.ni.com...
> Hi,
> Thanks, but lets say I know for a fact that my array will always be 30
> elements, wouldn't it be better to just initialize it at that and then
> just use 30 replace element functions every time as opposed to
> rebuilding the array?