LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

For Loop conundrum

Solved!
Go to solution

@Ben wrote:


The dangling participal (the unwired control) COULD imply other than starting at index "0".

 

Ben


Simply replacing my hard code 0 with the dangling Index control would take care of that problem.  Of course there are a lot of what ifs.  What if the second array length and the index extends beyond the length of the original array.  I'm not trying to write an all inclusive code that will match all possible scenarios.  I just wronte what matched the original post.  Please feel free to expand the code as you see fit.

- tbob

Inventor of the WORM Global
0 Kudos
Message 11 of 16
(885 Views)

I love guessing games so I will play along.  My guess is that the OP originally had the Index Control wired to the For Loop and the rest (second for loop, array size) was added during the fog of debugging.  I am guessing there is an array of indices and values and the goal is to replace certain elements. Only thing stopping that For Loop is an empty array or two as previously guessed.

 

If I insisted on using Globals I would at least move them outside the For Loop and use a Shift Register inside. 

 

My final guess is yes Alec, you were drunk and you haven't replied yet because of a hangover.

Message 12 of 16
(865 Views)

@Darin.K wrote:

 

My final guess is yes Alec, you were drunk and you haven't replied yet because of a hangover.


I nominate this post to be in the Funny Threads thread.

- tbob

Inventor of the WORM Global
Message 13 of 16
(853 Views)

 


tbob wrote:

According to the OP's original post, he wants to replace array elements starting at 0.


No, he tries to "insert into array", not "replace array subset". Look at the icon!

 

While we are all still guessing about the purpose, the (near) literal translation of the rube goldberg code is a simple build array in concatenate mode.

Here's a draft.

 

 

 

(Of course we don't know the size of the "mark" array, so most likely adjustments need to be made).

 

 

0 Kudos
Message 14 of 16
(834 Views)

@altenbach wrote:

 


tbob wrote:

According to the OP's original post, he wants to replace array elements starting at 0.


No, he tries to "insert into array", not "replace array subset". Look at the icon!

 

 


You're right.  After a while all these icons start looking the same.  Is it Friday yet?

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 15 of 16
(816 Views)

@tbob wrote:

@altenbach wrote:

 


tbob wrote:

...

You're right.  After a while all these icons start looking the same.  Is it Friday yet?

 


 

Yes if "Virtual Fridays" count. Smiley Tongue

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 16 of 16
(783 Views)