06-21-2023 10:26 AM
I am trying to search a 2D array and create a new array with the matched rows. I am getting blank spaces when the search is false how to i get the program to skip instead of putting blank spaces here the case structure disconnects the path out when false.
Thank you for your time
06-21-2023 10:29 AM
I figured it out right after posting, had to change the tunnel out of the for loop to conditional.
06-21-2023 12:08 PM - edited 06-21-2023 01:15 PM
... of course that initialize array and insert into array makes no sense. these don't do anything useful
Here's probably all you need...
06-21-2023 12:21 PM
@altenbach wrote:
... of course that initialize array and insert into array makes no sense. these don't do anything useful
For that matter, it doesn't even look like the Case Structure is required (assuming nothing is in the FALSE case).
06-21-2023 12:36 PM
Thanks that will make it much easier. Learning some new tricks with my latest program. Have only used shift registers up until now. This time I used the case structure and now my entire program fits on one screen without having to scroll around. This also makes my CPU usage almost 0 when nothing is happening where before it would be a steady 15% ± 5 running the loop.
06-21-2023 02:46 PM - edited 06-21-2023 02:49 PM
@altenbach wrote:
... of course that initialize array and insert into array makes no sense. these don't do anything useful
Here's probably all you need...
@CA Hmmm... did postage stamps get bigger?
You could migrate the indexing and comparison outside the loop by choosing the compare elements option from the right-click menu of the Is Equal primitive and have no code inside the loop! 😉 Just two auto indexing tunnels in and a conditional tunnel out.
06-21-2023 03:19 PM
@JÞB wrote:
You could migrate the indexing and comparison outside the loop by choosing the compare elements option from the right-click menu of the Is Equal primitive and have no code inside the loop! 😉 Just two auto indexing tunnels in and a conditional tunnel out.
Yes, but that would need to allocate two extra intermediary arrays ((1)the second column and (2) the Boolean array), so if the inputs are truly gigantic, we might run out of memory. 😄
06-23-2023 05:12 AM
@altenbach wrote:
@JÞB wrote:
You could migrate the indexing and comparison outside the loop by choosing the compare elements option from the right-click menu of the Is Equal primitive and have no code inside the loop! 😉 Just two auto indexing tunnels in and a conditional tunnel out.Yes, but that would need to allocate two extra intermediary arrays ((1)the second column and (2) the Boolean array), so if the inputs are truly gigantic, we might run out of memory. 😄
Thinking about it, that codeless loop would make a powerful VIM! I don't really have the time to fully test a full scale vim with the type specific cases in the optimal order. Could you bring that discussion up on another board? (I'm still Emeritus and can't get there)