11-08-2013 01:28 PM
I have constants of an Array.. I want to insert the an element to each of those contants, like FAILED OR PASSED. Can someone show me how to create 2D array? thanks
Solved! Go to Solution.
11-08-2013 01:35 PM
You don't need a 2-D array. Use a cluster to hold both the number, and string values, and then create an array of that cluster.
11-08-2013 01:51 PM - edited 11-08-2013 01:53 PM
In fact, you CAN'T have a 2D array like you want, because all the items in an array have to be of the same data type. So, you can have a 2-item cluster of 1-D arrays (separate number and P/F arrays) or a 1-D array of 2-item clusters (number-P/F clusters), whichever way your application would work with easier (the packing order will determine which characteristics are easier to get to).
Unless, you wanted to code Pass = 1, Fail = 0, then you could have a 2-D array.
Then, there's always a database .
Cameron
11-08-2013 02:03 PM
i have changed my numbers to string so it is seen as text.
11-08-2013 02:09 PM
@krispiekream wrote:
i have changed my numbers to string so it is seen as text.
It would make more logical sense to use a cluster, unless you are displaying this in a table.
If you create an array of your Pass/Fail results, then you need to use Build Array (make sure concatinating is turned off). You may have to use Transpose 2D Array to get it to display the way you want.
11-08-2013 02:16 PM
i am actually trying to print out the table of pass/failed devices.
i am just having a problem inserting the FAIL/PASS into the current CONSTANTS ARRAY OF DEVICES.
11-08-2013 03:44 PM - edited 11-08-2013 03:44 PM
Something like this?
11-08-2013 03:45 PM
yes!!1
thanks you!
thats exactly all i needed.