Compares two version strings.
Result := VerCompare(VersionA, VersionB)
The first version string to be compared.
The second version string to be compared, optionally prefixed with one of the following operators: <
, <=
, >
, >=
or =
.
If VersionB begins with an operator symbol, this function returns 1 (true) or 0 (false).
Otherwise, this function returns one of the following to indicate the relationship between VersionA and VersionB:
To check for a specific relationship between the two strings, compare the result to 0. 예를 들어:
a_less_than_b := VerCompare(a, b) < 0 a_greater_than_or_equal_to_b := VerCompare(a, b) >= 0
Version strings are compared according to the same rules as #Requires.
This function should correctly compare Semantic Versioning 2.0.0 version strings, but the parameters are not required to be valid SemVer strings.
This function can be used in a sort callback.
Checks the version of AutoHotkey in use.
if VerCompare(A_AhkVersion, ">=1.1.36.00") MsgBox This version has VerCompare built-in. else MsgBox This version < 1.1.36.00.