Issue 74928 - Recommendation for better explanation of string comparison in BASIC
Summary: Recommendation for better explanation of string comparison in BASIC
Status: ACCEPTED
Alias: None
Product: documentation
Classification: Unclassified
Component: Online help (show other issues)
Version: OOo 2.1
Hardware: All All
: P3 Trivial (vote)
Target Milestone: 4.x
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-27 17:30 UTC by bostjanv
Modified: 2017-05-20 11:31 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bostjanv 2007-02-27 17:30:49 UTC
I was quite surprised to find that OO BASIC string comparison is different than
in many other contexts (although it may be consistent with other BASIC
implementations). For example, "a" > "b" as well as "a" > "ab" etc. In other
words, string x "is greater than" string y iff x precedes y lexicographically.
In many other situations the definition is exactly the reverse: x > y iff y
precedes x. Note that the latter definition is a natural generalization of the
ordering of natural numbers: Number n > m if n appears later in the enumeration
of natural numbers. Since strings may be enumerated similarly to natural
numbers, it would make sense to define for two strings x > y as "x appears later
than y in the lexicographic enumeration of strings".

Obviously, I am not saying that the implementation should be changed; but in
view of the foregoing, I think that string comparison merits an explanation in
the on line and other documentation.

Looking at the online documention, an appropriate place for a small comment would be

Macros and Programming ->
Command Reference ->
Run-Time Functions, Statements, and Operators ->
Comparison Operators
Comment 1 Uwe Fischer 2007-02-28 08:35:07 UTC
@ab: can you comment, please?
Comment 2 ab 2007-02-28 12:49:10 UTC
Seems to be a bug, especially as VB behaves differently. Should be fixed
at lest for compatibilty mode. I'm not sure if we should document an obviously
wrong behaviour.

STARTED, OOo 2.x
Comment 3 ab 2008-01-25 13:39:42 UTC
-> 3.x
Comment 4 Marcus 2017-05-20 11:31:22 UTC
Reset assigne to the default "issues@openoffice.apache.org".