summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlain Romedenne <alain.romedenne@libreoffice.org>2022-04-25 17:15:31 +0100
committerAlain Romedenne <alain.romedenne@libreoffice.org>2022-04-28 08:27:59 +0200
commitb6accc5eaf8d547bc9721118caaa9edbc998a333 (patch)
tree519cbf6e7c16a3c8a1c7453153b29873c19dba27
parentf6d93aeda80f5a1f24e6fd162c43143a0373add3 (diff)
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.kaganski@collabora.com> Reviewed-by: Alain Romedenne <alain.romedenne@libreoffice.org>
-rw-r--r--source/text/sbasic/shared/03102100.xhp4
-rw-r--r--source/text/sbasic/shared/compatible.xhp5
-rw-r--r--source/text/sbasic/shared/new_keyword.xhp1
3 files changed, 7 insertions, 3 deletions
diff --git a/source/text/sbasic/shared/03102100.xhp b/source/text/sbasic/shared/03102100.xhp
index a992f45270..b66acc5802 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 ebe379ea7c..271bd25114 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 95d2ccff84..c6df340a40 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>