ASort Problems
Posted: Thu Jun 29, 2017 3:23 pm
The Vulcan ASort function with a codeblock does not work always as the VO ASort function.
When making tests I saw that the reason seems to be strange string comparisons in VO and XS I never realized before:
"" <= "a" returns true, "a" <= "" returns also true
"" > "a" returns false, "a" > "" returns also false
These comparisons seem to be reasonable:
"" < "a" returns true, "a" < "" returns false
"" >= "a" returns false, "a" >= "" returns true
"" == "a" returns false, "a" == "" returns false
Now I ask me:
What seems to be the sense of having rules like this?
How could the VO ASort algorithm be implemented that it sorts arrays with strings correctly? I seem to understand that the Vulcan implementation cannot not do this correctly having these comparison results.
Is this influenced by the "Compatible string comparisons" or is this switch regarding the = comparison?
Arne
When making tests I saw that the reason seems to be strange string comparisons in VO and XS I never realized before:
"" <= "a" returns true, "a" <= "" returns also true
"" > "a" returns false, "a" > "" returns also false
These comparisons seem to be reasonable:
"" < "a" returns true, "a" < "" returns false
"" >= "a" returns false, "a" >= "" returns true
"" == "a" returns false, "a" == "" returns false
Now I ask me:
What seems to be the sense of having rules like this?
How could the VO ASort algorithm be implemented that it sorts arrays with strings correctly? I seem to understand that the Vulcan implementation cannot not do this correctly having these comparison results.
Is this influenced by the "Compatible string comparisons" or is this switch regarding the = comparison?
Arne