Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Den 20 april 2012 15:57 skrev e-letter <inpost@gmail.com>:
Readers,

According to the specification for openformula (see:
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html),
the syntax for the function 'sum' is:

SUM( { NumberSequenceList N }+ )

e.g. SUM(a1+b2)

”a1+a2” is NOT a Number Sequence List. ”a1;a2” is.
What happens in your example, is that a1 and a2 are first calculated
and then sent to the function SUM, which then doesn't have very much
more to do than just returning its input value. So if a1=5 and a2=7,
then SUM's argument is 12. So SUM calculates the sum of 12 in this
case, which is very unnecessary.

On the other hand, with syntax ”=SUM(a1;a2₎”, a1 and a2 are sent to
SUM, and SUM calculates and returns the sum.

However in calc the function:

=a1+b2

still produces a correct result. Isn't the logical behaviour for the
second function to return an error, for non-compliance with the
standard.

No. ”=a1+a2” has nothing to do with the SUM function at all.

This is being asked for learning if it is better to use the
official syntax or accept that these "short-cuts" exist.

It's not a short-cut, since it has nothing to do with the SUM
function, see above.



LO334

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


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.