#1881 closed Bug (No Bug)
_VersionCompare
| Reported by: | hunt | Owned by: | Gary |
|---|---|---|---|
| Milestone: | Component: | Standard UDFs | |
| Version: | 3.3.6.1 | Severity: | None |
| Keywords: | Cc: |
Description
$Version1 = "1.9.1"
$Version2 = "1.10"
MsgBox(0,"",_VersionCompare($Version1, $Version2)) ==
returns 1 but must -1
$Version1 = "1.9.b"
$Version2 = "1.10"
MsgBox(0,"",_VersionCompare($Version1, $Version2)) ==
returns 1 but must -1
$Version1 = "1.9b"
$Version2 = "1.10"
MsgBox(0,"",_VersionCompare($Version1, $Version2)) ==
returns 1 but must -1
Attachments (0)
Change History (4)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
comment:3 by , 15 years ago
If UBound($aVersion1) <> UBound($aVersion2) Then will lexicographical comparison without numerical comparison but this is WRONG.
comment:4 by , 15 years ago
No. Nothing wrong with that.
- Its stated that it will try to do a numerical compare.
This will try to use a numerical comparison but fall back on a lexicographical comparison.
If you like it to behave differently recode your local copy.
Or provide the function with (better matching) version strings that will be compared in numerical mode.
(case closed for me. Ergo: not commenting on it anymore. (try forum for additional feedback/talking on this))

Documented (well kinda) Function limitation. (No bug)