Bug 163745 - BASIC help pages must explicitly state types of all arguments and of return value
Summary: BASIC help pages must explicitly state types of all arguments and of return v...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: HelpGaps-NewFeatures
  Show dependency treegraph
 
Reported: 2024-11-03 07:56 UTC by Mike Kaganski
Modified: 2024-11-04 12:08 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2024-11-03 07:56:43 UTC
Consider, for example, HasUnoInterfaces Function help page [1]. It has a "syntax" part. The following "Parameters" section does not explicitly mention the types of the arguments passed to the function.

The implementation of the function [2] expects the first argument to be Object, and the rest String. This must be mentioned in the help page directly at every argument.

All the help pages for Basic functions have proper Basic types of all arguments and return values explicitly stated.

[1] https://help.libreoffice.org/24.8/en-US/text/sbasic/shared/03104400.html?DbPAR=BASIC
[2] https://opengrok.libreoffice.org/xref/core/basic/source/classes/sbunoobj.cxx?r=ee4554b0&fi=RTL_Impl_HasInterfaces#RTL_Impl_HasInterfaces
Comment 1 Mike Kaganski 2024-11-03 08:07:59 UTC
It would be nice, if both Return Value, and Parameters, were table; the return value could be the last row of that table, with the "name" like [return value]. The "Type" column would only contain the proper Basic type; and the last column would describe the element: e.g., for "return value", part of the text could be moved from above, like

> Name                  Type    Description
> -------------------------------------------------------------------------
> oTest                 Object  the Basic Uno object that you want to test.
> -------------------------------------------------------------------------
> Uno-Interface-Name 1, String  Uno interface name(s)
> Uno-Interface-Name 2,
> ...
> -------------------------------------------------------------------------
> [Return value]        Boolean True, if all stated Uno interfaces are
>                               supported, otherwise False

Note that current text at "oTest", mentioning "the Basic Uno object" in a free-text description, is not a proper API-documentation-style type definition. It is OK to have that description, but it doesn't replace the formal type name of the language.
Comment 2 Mike Kaganski 2024-11-03 10:08:59 UTC
(In reply to Mike Kaganski from comment #0)
> All the help pages for Basic functions have proper Basic types of all
> arguments and return values explicitly stated.

Of course, the intention was "All the help pages for Basic functions MUST have proper Basic types ...", I forgot to type "MUST".