Bug 149959 - "Optional" keyword, "Defining Optional Parameters", IsMissing (Basic) need clarification about mandatory check before accessing
Summary: "Optional" keyword, "Defining Optional Parameters", IsMissing (Basic) need cl...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2022-07-12 06:06 UTC by Mike Kaganski
Modified: 2023-01-21 16:00 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:
Regression By:


Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2022-07-12 06:06:44 UTC
"Optional" keyword [1], "Defining Optional Parameters" [2], IsMissing [3] all need some specific statement about requirement to check the optional variant function arguments using IsMissing (or IsError, IsNumeric, etc.) before checking its content (like comparing the passed value to something); it may also be passed to other functions taking optional arguments (so its missing status would be checked there).

"Defining Optional Parameters" [2] must also discuss differences in behavior of optional arguments which have variant and fixed types (also with regards to compatibility options).

Some users are caught by fixes like 522f5ad4d8c92624fffa869143aa869662a48589, e32d864dbe086d630a8b17c2d376e320aee0253a.

[1] https://help.libreoffice.org/7.4/en-US/text/sbasic/shared/03104100.html?DbPAR=BASIC
[2] https://help.libreoffice.org/7.4/en-US/text/sbasic/shared/01020300.html?DbPAR=BASIC#hd_id161584366585035
[3] https://help.libreoffice.org/7.4/en-US/text/sbasic/shared/03104000.html?&DbPAR=BASIC
Comment 1 Mike Kaganski 2022-07-12 06:19:10 UTC
See 8e323fcacebad1afe9d867b846722a6b9bf20f78 commit message for clear explanation of different treatment of Optional in plain mode, Option Compatible, and Option VBASupport.

See 44640598eda121aa83d4e89b874579d90f00e6fb that already introduced some discussion of the said differences.
Comment 2 Mike Kaganski 2022-07-12 06:20:15 UTC
(In reply to Mike Kaganski from comment #1)
> See 44640598eda121aa83d4e89b874579d90f00e6fb that already introduced some
> discussion of the said differences.

... in help: https://git.libreoffice.org/help/+/44640598eda121aa83d4e89b874579d90f00e6fb
Comment 3 Xisco Faulí 2022-07-12 08:58:37 UTC
Moving to NEW