Bug 141474 - Documentation specifies incorrect parameter names for Basic functions
Summary: Documentation specifies incorrect parameter names for Basic functions
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
7.0.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.2.0 target:7.3.0 target:7.4.0
Keywords:
Depends on: 147262
Blocks: Macro-StarBasic
  Show dependency treegraph
 
Reported: 2021-04-03 13:49 UTC by Vladimir Sokolinskiy
Modified: 2022-05-19 14:22 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Sokolinskiy 2021-04-03 13:49:10 UTC
The parameters of Basic functions are named; in the documentation, in many cases, parameter names are specified incorrectly.

For example, for the Msgbox function, the documentation states that the function has parameters:

MsgBox (Text As String [,Type As Integer [,Dialogtitle As String]]) 


In fact, the function has parameters with the same name as the similar Excel function. Basic script:

Sub test
  Msgbox Prompt:="Prompt", Buttons:=MB_ICONSTOP, Title:="Documentation"
End Sub


In my opinion, it is necessary in the documentation to clarify the names of the parameters in this and similar cases.
Comment 1 Olivier Hallot 2021-04-08 14:43:14 UTC
The current Help page reflects the LibreOffice Basic implementation of the MsgBox instruction or function.
Comment 2 Vladimir Sokolinskiy 2021-04-08 18:41:15 UTC
The parameter names of the LibreOffice Basic Msgbox function are described [url=https://opengrok.libreoffice.org/xref/core/basic/source/runtime/stdobj.cxx?r=fbaf865f#610]here[/url] (as far as I understand). 

arg(u"Prompt",   SbxSTRING),
arg(u"Buttons",  SbxINTEGER, OPT_),
arg(u"Title",    SbxSTRING,  OPT_),
arg(u"Helpfile", SbxSTRING,  OPT_),
arg(u"Context",  SbxINTEGER, OPT_),
Comment 3 Alain Romedenne 2021-04-09 08:20:04 UTC
(In reply to Vladimir Sokolinskiy from comment #2)
> The parameter names of the LibreOffice Basic Msgbox function are described
> [url=https://opengrok.libreoffice.org/xref/core/basic/source/runtime/stdobj.
> cxx?r=fbaf865f#610]here[/url] (as far as I understand). 
> 
> arg(u"Prompt",   SbxSTRING),
> arg(u"Buttons",  SbxINTEGER, OPT_),
> arg(u"Title",    SbxSTRING,  OPT_),
> arg(u"Helpfile", SbxSTRING,  OPT_),
> arg(u"Context",  SbxINTEGER, OPT_),

Correct !
Comment 4 Alain Romedenne 2021-04-09 08:31:11 UTC
As a minimum help pages should document the exact names for arguments that are actually implemented. As for MsgBox function implemented parameter names are: prompt, buttons and title.
Comment 5 Commit Notification 2021-04-14 07:35:10 UTC
Alain Romedenne committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/a26e51cc4e5af7eae340fcf20e31e991239def2d

tdf#141474 MsgBox function signature
Comment 6 Commit Notification 2021-04-14 11:29:25 UTC
Alain Romedenne committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/f1c3329df60dd8e0d5fb495a1e2f12790eb7a829

tdf#141474 InputBox Basic method signature
Comment 7 Commit Notification 2021-05-05 23:02:38 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/f9a2226309678e6a8769af6d312f796bb6835c4b

tdf#131368, tdf#141474 Document WeekDay Basic function
Comment 8 Vladimir Sokolinskiy 2021-05-06 10:35:34 UTC
Thank you very much, colleagues!
Comment 9 Commit Notification 2021-06-10 13:08:56 UTC
Alain Romedenne committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/e5ac483bab252537ccbd087e6a133230cb8bae70

tdf#141474 tdf#124066 Basic keyword arguments explanations
Comment 10 Commit Notification 2021-11-10 19:23:12 UTC
Alain Romedenne committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/b902fbcc87b0baf76b3dd501f0feff40bb1f3711

tdf#141474 Atn, Cos, Sin, Tan function signatures
Comment 11 Vladimir Sokolinskiy 2021-11-10 19:24:29 UTC
Thanks again!
Comment 12 Commit Notification 2021-11-16 13:15:22 UTC
Alain Romedenne committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/eb45e7df8aeeab7791876038c16345d5321e49b1

tdf#141474 Asc, AscW function signatures
Comment 13 Commit Notification 2021-12-02 19:32:45 UTC
Alain Romedenne committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/3b63a6a4d3e61d57c552051037f69b8cdbac167b

tdf#141474 CBool, CByte, CCur function signatures
Comment 14 Commit Notification 2022-01-26 20:32:34 UTC
Alain Romedenne committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/2f76d8e9280cbe1e726cfcf2d4a798c8cf418241

tdf#145693 tdf#141474 Chr ChrW method signatures
Comment 15 Commit Notification 2022-02-18 00:17:59 UTC
Alain Romedenne committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/401fb641aff217c7c333ce71d22abcf575d3ed09

tdf#114263 tdf#141474 tdf#147262 CallByName() function new help page
Comment 16 Commit Notification 2022-05-09 15:44:39 UTC
Alain Romedenne committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/084d84f09882ec35007ad4566247932a30899799

tdf#141474 tdf#148466 Choose function accepts keyword arguments
Comment 17 Commit Notification 2022-05-19 14:22:48 UTC
Alain Romedenne committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/f3b76b5e8d644176704c4619304278869ae57127

tdf#141474 Cdbl, Cint, Clng, Csng accept keyword arguments