The CompareVersions function compares two file versions and returns whether they are identical. This function has the following format:
CompareVersions (version1 as string, version2 as string) as integer
Example: CompareVersions
CompareVersions ("12.5.1.4", "12.5.0.3")
Input Parameters
This function has the following input parameters:
Specifies the versions of the file you want to compare. You can specify any number of version identification items in the version string. For example, you can specify the version string using the major.minor.patch.build format or just the major.minor format. The version numbers can be separated by dots, spaces, or commas. If one version string has more identification items than the other version string, the missing items are replaced with zero at the time of comparison. For example, CompareVersions ("12.5.180.123", "12.5") is treated as CompareVersions ("12.5.180.123", "12.5.0.0").
Return Values
The function returns one of the following predefined integer constants:
Indicates that the versions are equal.
Indicates that version 1 is greater than version 2.
Indicates that version 1 is lower than version 2.
Indicates that one or both of the version strings is blank or contains a non-numeric value.
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|