Opened on Feb 20, 2011 at 2:21:14 PM
Closed on Feb 22, 2011 at 8:26:00 AM
Last modified on Feb 23, 2011 at 1:26:06 PM
#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:2 by , on Feb 22, 2011 at 8:26:00 AM
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
comment:3 by , on Feb 23, 2011 at 8:24:24 AM
If UBound($aVersion1) <> UBound($aVersion2) Then will lexicographical comparison without numerical comparison but this is WRONG.
comment:4 by , on Feb 23, 2011 at 1:26:06 PM
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)