NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Locals.a+ = Str(locals.b)+

Since i am not good in C++ language I am not bale to undertsand this condition....i.e

 

Locals.faultlist+ = Str(locals.faultcode)+"/n"

 

could you pls explian how this works.

0 Kudos
Message 1 of 5
(3,364 Views)

First, let us look at the right side of the equation.  Look like a fault code (number?) is being turned into a string and then an End of Line is added to the end of the string.  Now the += is a way to just add on to the value on the left.  So what you are really getting is a string containing what was already in the faultlist with a new number and End of Line appended to it.


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 2 of 5
(3,362 Views)

Thanks for your reply...

 

What does Str(Local.faultcode)+ indicates...i know you have mentione that this converts to string..pls let me know

0 Kudos
Message 3 of 5
(3,357 Views)

both faultcode and faultlist is declared as string

0 Kudos
Message 4 of 5
(3,355 Views)

the str(faultcode) converts the faultcode into a string.  The + appends strings.


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 5 of 5
(3,338 Views)