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.odtSection 4.1 Text (String)


I apologize for breaking the threading with this message.

Eike Rathke wrote at 17:41 on 23 Feb 2007:

> 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.

Thank you. You explained things well.

Now I guess I'm going to drift off the topic of the original post. I won't
pursue this topic on this list beyond this message unless I am asked to do
so.

> > 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.

Unfortunately, the instance in which I encountered this involved a string
of digits rather than alphabetic text. I was interested in extracting
individual digits from a long string (e.g. 123456789456789123789123456)
which was interpreted as a floating point string (e.g.
1.23456789456789E+026) instead. Enclosing the string in double-quotes moved
the first digit into the second position in the string. I guess there is no
way to enter a long string of digits preserving the integrity of the string
with the first character in the string being the first digit and the last
character in the string being the last digit. I still believe that the
double-quotes surrounding a string should _not_ be a part of the string in
a cell reference.

> > 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 did not realize that was what I was doing since OOo did it behind my
back.  

> > 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".

Again I thank you.

-- 
Jim



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