Undesired Return Value When Comparing String Elements

Updated Jun 22, 2020

Reported In


  • LabVIEW

Issue Details

When I input an array of string elements into the Array Max & Min Function , I do not get the desired maximum or minimum value. 


String values in LabVIEW are compared according to the values of the ASCII character codes
Therefore, they compare those values from left to right, and not based on the numeric values. 

For instance, if you compare a large value with extra leading zeroes as a string, LabVIEW will consider it smaller than a value that has no leading zeroes. 
(i.e. 1000 > 01001)

If you would like to compare the strings according to their numeric values, you must convert the string into a numeric value first.