OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [office-comment] Document openformula-20070208-dwheeler5.odt Section 4.1 Text (String)


Hi James,

On Thursday, 2007-02-22 14:05:20 -0800, James E. Lang wrote:

> I have found an ambiguity in the section cited in the subject of this
> message.

Actually it isn't an ambiguity, explanation follows.

> I ran across this issue while using OpenOffice.org 2.1 which includes the
> surrounding double-quotes as a part of the string.

Only if they are part of a _cell content_, which is different from
a literal string constant passed as argument.

> Given cell A1 containing string "abc" and cell A2 containing string abc.
> The function call LEN(A1) returns the value five (5) while the function
> call LEN(A2) returns the value three (3).

Which is fine. If you wanted to pass "abc" including the quotes as
a string constant argument you would have to escape the quotes by
doubling them, as in LEN("""abc""")

> Function calls CODE(A1) and
> CODE(RIGHT(A1;1)) both return the value zero (0).

That's yet something different. You probably used typographical quotes
and not ASCII ones, and the typographical quote used can't be
represented by the octet encoding that CODE and CHAR operate on.

> I do not believe that this behavior conforms with the intent of the section
> cited in the subject of this message but I do believe that the section
> needs to be clarified.

The term "constant surrounded by double-quotes" used there usually is
well-defined. However, I added a reference to "5.4 Constant Strings".

  Eike

-- 
 OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]