To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This is a simple VI that facilitates comparing two version strings of the format "n.n.n.n" to tell whether the two versions are equal, or which one is later than the other.
Description
This VI is used to compare version strings of the type "n.n.n.n" to tell if one string represents an earlier or later version than the other. For version strings, each "n" is interpreted as an integer. This function interprets each integer, so that version 1.11 is recognized as greater than version 1.2, for example. Note that missing minor versions are interpreted as 0, so that verion 1.1.0 is equal to version 1.1. Also note that this VI is only designed to work with version integers of up to four digits. E.g. it can parse version 1.9999.1.0 correctly, but is not guaranteed to parse version 1.10001.1.0 correctly. In addition, this VI ignores insignificant formatting issues, such as extra spaces or leading zeros in any of the sub-versions.
Original Code by David Thomson February, 2015
copyright 2015, Original Code Consulting
This VI is available as freeware for use by the LabVIEW community, with the sole condition being that the attribution to the author be left intact in this documentation.
Requirements
Software:
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.