Bug 99613 - optional Paramaters for IF is optional
Summary: optional Paramaters for IF is optional
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Help-Changes-Features
  Show dependency treegraph
 
Reported: 2016-05-01 20:01 UTC by Dennis Roczek
Modified: 2018-09-29 21:04 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot without error (26.63 KB, image/png)
2016-05-01 22:00 UTC, m.a.riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Roczek 2016-05-01 20:01:53 UTC
"In the LibreOffice Calc functions, parameters marked as "optional" can be left out only when no parameter follows. For example, in a function with four parameters, where the last two parameters are marked as "optional", you can leave out parameter 4 or parameters 3 and 4, but you cannot leave out parameter 3 alone."
Quoted from IF function at
https://help.libreoffice.org/Calc/Logical_Functions#IF
http://vm173.documentfoundation.org/text/scalc/01/04060105.xhp

This is simply untrue in the case of IF, try it yourself with:
=IF("a"="b";;)

(If that makes sense is totally different, but it works, same useful as =FALSE())
Comment 1 m.a.riosv 2016-05-01 21:39:14 UTC
Hi @Dennis, it returns zero, it's not right?

The only thing could be that the cell is not auto-formatted as Boolean, but there is not calculation in the parameters to forces it, and an IF can returns any type of result not necessarily a Boolean.

Suppressing both parameters =IF("a"="b") then returns FALSE, inheriting from the comparison inside the function.
Comment 2 Dennis Roczek 2016-05-01 21:48:52 UTC
Hi miguel,
well it doesn't matter if it return 0 or FALSE (depending on the ; or the formatting of the cell): the complete sentence is wrong: the sentence imply that an ERR:501 appear similar to =ACOS()

so, simplest "solution" would be to remove the complete sentence as it is untrue.
Comment 3 m.a.riosv 2016-05-01 22:00:57 UTC
Created attachment 124773 [details]
Screenshot without error

I can't see the error, perhaps I miss something.
Comment 4 Dennis Roczek 2016-05-01 22:03:35 UTC
the problem is not the function itself, it is the documentation!
Comment 5 m.a.riosv 2016-05-01 22:10:00 UTC
Sorry I can't understand what it's exactly bad in the help, sure my non English.
Comment 6 Dennis Roczek 2016-05-02 12:18:24 UTC
The paragraph:

"In the LibreOffice Calc functions, parameters marked as "optional" can be left out only when no parameter follows. For example, in a function with four parameters, where the last two parameters are marked as "optional", you can leave out parameter 4 or parameters 3 and 4, but you cannot leave out parameter 3 alone."

is wrong. Parameter 2 and 3 can omitted - this paragraph indicates something different!
Comment 7 Buovjaga 2016-05-02 14:58:55 UTC
Let's set to NEW.