From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

D'oh!

I just tracked down a subtle bug in my code -- this syntax was the culprit:

 

SubtleBugIndexArray

 

That's all!

 

Just sharing a silly bug that cost about a half-hour, intentionally starting a new thread to protest the megathreads that now dominate Breakpoint Smiley Very Happy

Message 1 of 14
(14,397 Views)

I am sure I would have found it in 28 minutes. 😄

Message 2 of 14
(14,396 Views)

As they say in Texas: "If it was a snake it would have bit ya'.". Smiley Tongue

PaulG.

LabVIEW versions 5.0 - 2020

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 3 of 14
(14,357 Views)

Been there, done that.  99% of the time, it is something really stupid like that.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 14
(14,340 Views)

@crossrulz wrote:

Been there, done that.  99% of the time, it is something really stupid like that.


And the other 1% it's something really, REALLY stupid.

Message 5 of 14
(14,318 Views)

Do you think it'd be worth as posting as an idea?

 

Array.png


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

0 Kudos
Message 6 of 14
(14,282 Views)

@Alex.T wrote:

Do you think it'd be worth as posting as an idea?

 

Array.png


Go ahead and post it.  It's an interesting idea.  If it can be pulled off, I think it would help readability a lot.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 14
(14,274 Views)

@Alex.T wrote:

Do you think it'd be worth as posting as an idea?


I'm sorry, but this is what I thought of when I saw your image:

 

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 8 of 14
(14,268 Views)

@Alex.T wrote:

Do you think it'd be worth as posting as an idea?

 

Array.png


It's a cool idea, but one problem with it is that it can only refer to the indices of the primitive itself (i.e. if someone wires a value into one of the inputs and that value is not a constant, then there's no way of knowing what the index in the array would be). I would suggest a modification - if a constant is wired into the primitive (or no value at all), then the primitive shows the indices until the next value wired into an input. Otherwise, it shows the same square which was there until now. I would show that as a demo image in the idea. I would also add an expection where if the index value is large and won't fit into the primitive, the output would show a square instead.


___________________
Try to take over the world!
Message 9 of 14
(14,267 Views)
0 Kudos
Message 10 of 14
(14,249 Views)