source/text/sbasic/shared/03102100.xhp | 4 +++- source/text/sbasic/shared/compatible.xhp | 5 +++-- source/text/sbasic/shared/new_keyword.xhp | 1 + 3 files changed, 7 insertions(+), 3 deletions(-)
New commits: commit b6accc5eaf8d547bc9721118caaa9edbc998a333 Author: Alain Romedenne <alain.romede...@libreoffice.org> AuthorDate: Mon Apr 25 17:15:31 2022 +0100 Commit: Alain Romedenne <alain.romede...@libreoffice.org> CommitDate: Thu Apr 28 08:27:59 2022 +0200 tdf#114263 Basic 'New' operator is optional when setting 'Option Compatible' Change-Id: I27ef9d9c832e4c52e5066336e54095ca949fec9c Reviewed-on: https://gerrit.libreoffice.org/c/help/+/133398 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> Reviewed-by: Alain Romedenne <alain.romede...@libreoffice.org> diff --git a/source/text/sbasic/shared/03102100.xhp b/source/text/sbasic/shared/03102100.xhp index a992f4527..b66acc580 100644 --- a/source/text/sbasic/shared/03102100.xhp +++ b/source/text/sbasic/shared/03102100.xhp @@ -53,6 +53,9 @@ <bascode> <paragraph id="par_id3149412" role="bascode" xml-lang="en-US">Dim variable [(start To end)] [As typename][, variable2[char] [(start To end)] [,...]]</paragraph> </bascode> +<section id="optionalNew"> +<tip id="par_id221651071987432"><literal>New</literal> operator is optional when setting <link href="text/sbasic/shared/compatible.xhp" name="Option Compatible">Option Compatible</link> option.</tip> +</section> <section id="DimCommons"> <embed href="text/sbasic/shared/00000003.xhp#functparameters"/> @@ -74,7 +77,6 @@ <paragraph id="par_id3151251" role="paragraph" xml-lang="en-US"> <emph>String:</emph> String variable consisting of a maximum of 64,000 ASCII characters.</paragraph> <paragraph id="par_id3154704" role="paragraph" xml-lang="en-US"> <emph>Variant:</emph> Variant variable type (contains all types, specified by definition). If a type name is not specified, variables are automatically defined as Variant Type, unless a statement from <literal>DefBool</literal> to <literal>DefVar</literal> is used.</paragraph> <paragraph role="paragraph" id="par_id21587667790810"> <emph>object:</emph> Universal Network object (UNO) object or <link href="text/sbasic/shared/classmodule" name="Class module">ClassModule</link> object instance.</paragraph> - <paragraph id="par_id3153510" role="paragraph" xml-lang="en-US"><emph>char:</emph> Special character that declares the data type of a variable.</paragraph><paragraph role="paragraph" id="par_id971587473518701"> <image src="media/helpimg/sbasic/char_fragment.svg" id="img_id4156296484516"><alt xml-lang="en-US" id="alt_id15152796484516">Type declaration characters fragment</alt></image> </paragraph> diff --git a/source/text/sbasic/shared/compatible.xhp b/source/text/sbasic/shared/compatible.xhp index ebe379ea7..271bd2511 100644 --- a/source/text/sbasic/shared/compatible.xhp +++ b/source/text/sbasic/shared/compatible.xhp @@ -30,8 +30,9 @@ letter in the Latin-1 (ISO 8859-1) character set, are accepted as part of identifiers.</paragraph></listitem> <listitem><paragraph role="listitem" id="N0109">Create <link href="text/sbasic/shared/03040000.xhp#addvbaconstants" name="addvbaconstants">VBA constants including non-printable characters</link>.</paragraph></listitem> - <listitem><paragraph role="listitem" id="N0112">Default values for optional parameters in procedures.</paragraph></listitem> - <listitem><paragraph role="listitem" id="N0113">Named arguments when multiple optional parameters exist.</paragraph></listitem> + <listitem><paragraph role="listitem" id="N0110">Allow the <literal>New</literal> operator to be optional in <literal>Dim</literal> statements.</paragraph></listitem> + <listitem><paragraph role="listitem" id="N0112">Allow default values for optional parameters in procedures.</paragraph></listitem> + <listitem><paragraph role="listitem" id="N0113">Use named arguments when multiple optional parameters exist.</paragraph></listitem> <listitem><paragraph role="listitem" id="N0114">Preload of %PRODUCTNAME Basic libraries</paragraph></listitem> </list> <note id="N0115"><literal>Option Compatible</literal> is required when coding class modules.</note> diff --git a/source/text/sbasic/shared/new_keyword.xhp b/source/text/sbasic/shared/new_keyword.xhp index 95d2ccff8..c6df340a4 100644 --- a/source/text/sbasic/shared/new_keyword.xhp +++ b/source/text/sbasic/shared/new_keyword.xhp @@ -53,6 +53,7 @@ <paragraph role="bascode" localize="false" id="bas_id461633631136636">oProp2.Name = "Other name"</paragraph> <paragraph role="bascode" localize="false" id="bas_id121633631136838">oProp2.Value = 200</paragraph> </bascode> + <embed href="text/sbasic/shared/03102100.xhp#optionalNew"/> <paragraph role="paragraph" id="par_id971633631328827">The example below creates a new type <literal>Student</literal> and instantiates an object of this type:</paragraph> <bascode> <paragraph role="bascode" localize="false" id="bas_id981633473836933">Type Student</paragraph>