unit/
tx_cmp_version.pro
includes main-level programtop tx_cmp_version
result = tx_cmp_version(version1, version2)
Compares two version numbers for the more updated number. Returns 0 for equal versions, 1 if version1 is later than version2, and -1 if version1 is less than version2. Strings such as 'alpha' and 'beta' may be tacked on to the end of a version, but are compared alphabetically.
Return value
-1, 0, or 1
Parameters
- version1 in required type=string
first version number
- version2 in required type=string
second version number
Examples
For example, 1.2 is later than 1.1.2:
IDL> print, tx_cmp_version('1.2', '1.1.2')
1
File attributes
Modification date: | Fri Nov 12 11:07:14 2010 |
Lines: | 80 |
Docformat: | rst rst |