Overview
LabVIEW makes it very easy to append or concantenate an array of strings, but the MathScript node implements this functionality differently. This example demonstrates how to concanentate arrays of strings, removing some of the blanks.
Description
The code in the MathScript node works as follows:
Line number:
1: Declaring a variable which uses the size function built into the node to get the size of the input array (in this case first names)
2: Doing the same thing on the second input array (last names)
4: Creating a final output variable
6: Comparing sizes of the array to look for issues in sizes
7: Starting the search of array lengths
8: Building string1
9: Building string2
10: Concantenating the strings together using the strconcat function.
11: End
12: End
Additional functions which could be added:
deblank to get rid of the additional spaces
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Snippet
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.