Expanding a bit on Jonny's concatenation:
A1: "" (null string)
A2: 1 (numeric)
A3: =A1+A2 displays #VALUE
A4: =A1 & A2 displays left-aligned "1". It is a text result.
A5: =A2 + A4 displays a right-aligned 2. It is a numeric result.
Ergo, the "+" operator gave #VALUE result when combining a null string and
a numeric but gives a numeric when combining a <text string which can be
interpreted as a numeric> with a numeric.
Per my mini-sermon (earlier today) on debugging and preferring strict
type-based behavior, I would prefer A5 to also display #VALUE.
--
David S. Crampton
On Sat, 03 Dec 2011 12:08:20 -0800, Jay Lozier <jslozier@gmail.com> wrote:
On 12/03/2011 12:50 PM, Johnny Rosenberg wrote:
2011/12/3 Pedro<pedlino@gmail.com>:
Johnny Rosenberg wrote
Depending on the value in other cells, the result can be a time or an
empty string (""). In this case, E9 is an empty string, so E10 becomes
”#VALUE!”, and in fact every cell below E10 is also ”#VALUE!” because
of this.
Can you provide an example file? This used to be a problem but it is
fixed
in 3.4.4 (at least under Windows)
I could, but it's not needed, I think. I just did this simple test in
3.3.4 and 3.4.4:
Open LibreOffice Calc from scratch.
A1:
=""
A2:
=A1+1
In LibreOffice 3.3.4 (Ubuntu 10.10), A2 displays:
1
In 3.4.4 (Ubuntu 11.10), OOO340m1 (Build:402), A2 displays:
#VALUE!
Try in A1 no data/empty cell and in A2 =A1+1, you will get 1 in A2. You
are adding a text and number and the + operator is not used for
concatenation.
This has to do with operator overloading, are other, similar, operations
allowed when using '+'. Some may allow it and others may not,
restricting its use to mathematical operations only. LO uses the '&'
operator for concatenation.
If you use A1 = "" and A2 = A1 & 1 you get 1.
Kind regards
Johnny Rosenberg
ジョニー・ローゼンバーグ
--
View this message in context:
http://nabble.documentfoundation.org/Stuck-with-3-3-forever-tp3557428p3557454.html
Sent from the Users mailing list archive at Nabble.com.
--
For unsubscribe instructions e-mail to:
users+help@global.libreoffice.org
Problems?
http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more:
http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be
deleted
--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Context
- [libreoffice-users] Re: Stuck with 3.3 forever? (continued)
Re: [libreoffice-users] Re: Stuck with 3.3 forever? · Jay Lozier
Re: [libreoffice-users] Stuck with 3.3 forever? · Tom Davies
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.