#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 Changed 14 years ago by mvg
comment:2 Changed 14 years ago by Jpm
- Resolution set to No Bug
- Status changed from new to closed
comment:3 Changed 14 years ago by anonymous
If UBound($aVersion1) <> UBound($aVersion2) Then will lexicographical comparison without numerical comparison but this is WRONG.
comment:4 Changed 14 years ago by mvg
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))
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Documented (well kinda) Function limitation. (No bug)