summaryrefslogtreecommitdiffstats
path: root/helpcontent2/source/text/sbasic/shared/fragments.xhp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
commit267c6f2ac71f92999e969232431ba04678e7437e (patch)
tree358c9467650e1d0a1d7227a21dac2e3d08b622b2 /helpcontent2/source/text/sbasic/shared/fragments.xhp
parentInitial commit. (diff)
downloadlibreoffice-267c6f2ac71f92999e969232431ba04678e7437e.tar.xz
libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.zip
Adding upstream version 4:24.2.0.upstream/4%24.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'helpcontent2/source/text/sbasic/shared/fragments.xhp')
-rw-r--r--helpcontent2/source/text/sbasic/shared/fragments.xhp70
1 files changed, 70 insertions, 0 deletions
diff --git a/helpcontent2/source/text/sbasic/shared/fragments.xhp b/helpcontent2/source/text/sbasic/shared/fragments.xhp
new file mode 100644
index 0000000000..dd5b9dc83f
--- /dev/null
+++ b/helpcontent2/source/text/sbasic/shared/fragments.xhp
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<helpdocument version="1.0">
+ <!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ -->
+ <meta>
+ <topic id="org.LibreOffice.sBasic.fragments.en" indexer="include" status="PUBLISH">
+ <title id="tit" xml-lang="en-US">Basic syntax diagrams fragments</title>
+ <filename>/text/sbasic/shared/fragments.xhp</filename>
+ </topic>
+ </meta>
+ <body>
+ <section id="fragments">
+ <h1 id="hd_id541587044867073"><variable id="fragmentsh1"><link href="text/sbasic/shared/fragments.xhp">Syntax fragments</link></variable></h1>
+ <paragraph role="paragraph" id="par_id881587044839050">%PRODUCTNAME Basic syntax fragments.</paragraph>
+ </section>
+
+<section id="argument">
+ <h4 id="hd_id431587045941514"><variable id="argumenth2"><link href="text/sbasic/shared/fragments.xhp"></link>argument fragment</variable></h4>
+ <paragraph role="paragraph" id="par_id491585753339474"><image src="media/helpimg/sbasic/argument_fragment.svg" id="img_id4156296484514"><alt xml-lang="en-US" id="alt_id15152796484514">argument fragment</alt></image></paragraph>
+ <bascode>
+ <paragraph role="bascode" id="par_id3151084" localize="false">{[Optional [ByRef|ByVal]]|ParamArray} argument {{As typename|char}[ = expression]|[()]As Variant}</paragraph>
+ </bascode>
+ <h4 id="hd_id811587303969210">Parameters</h4>
+ <paragraph role="paragraph" id="par_id481586090298901"><literal>Optional</literal>: The argument is not mandatory.</paragraph>
+ <paragraph role="paragraph" id="par_id331586090532804"><literal>ByRef</literal>: The argument is passed by reference. <literal>ByRef</literal> is the default.</paragraph>
+ <paragraph role="paragraph" id="par_id331586090432804"><literal>ByVal</literal>: The argument is passed by value. Its value can be modified by the called routine.</paragraph>
+ <paragraph role="paragraph" id="par_id651587044335713"><emph>char:</emph> Type declaration character.</paragraph>
+ <paragraph role="paragraph" id="par_id651587044336713"><emph>typename</emph>: Primitive data type name. Library or module defined types can also be specified.</paragraph>
+ <paragraph role="paragraph" id="par_id11587045141290"><emph>= expression</emph>: Specify a default value for the argument, matching its declared type. <literal>Optional</literal> is necessary for each argument specifying a default value.</paragraph>
+ <paragraph role="paragraph" id="par_id331586091432804"><literal>ParamArray</literal>: Use <literal>ParamArray</literal> when the number of parameters is undetermined. A typical scenario is that of a Calc user-defined function. Using <literal>ParamArray</literal> should be limited to the last argument of a routine.</paragraph>
+ <tip id="par_id851587050837107">Using<literal>ParamArray</literal> or <emph>= expression</emph> require <link href="text/sbasic/shared/compatible.xhp">Option Compatible</link> to be placed before the executable program code in a module.</tip>
+ <warning id="par_id391587571321063">When using <link href="text/sbasic/shared/vbasupport.xhp">Option VBASupport 1</link>, <literal>Optional</literal> arguments with no default value (<emph>= expression</emph>) are initialized according to their data type, except if <literal>Variant</literal>.</warning>
+</section>
+
+<section id="array">
+ <h4 id="hd_id231587046013456"><variable id="arrayh4"><link href="text/sbasic/shared/fragments.xhp">array fragment</link></variable></h4>
+ <paragraph role="paragraph" id="par_id491586753339473"><image src="media/helpimg/sbasic/array_fragment.svg" id="img_id4156296484514"><alt xml-lang="en-US" id="alt_id15152796484514">array fragment</alt></image></paragraph>
+ <bascode>
+ <paragraph role="bascode" id="par_id3150983" localize="false">( [[start To] end], .. )</paragraph>
+ </bascode>
+ <h4 id="hd_id731587304120258">Parameters</h4>
+ <paragraph role="paragraph" id="par_id951587051619162"><emph>start:</emph> Lower bound of a dimension.</paragraph>
+ <paragraph role="paragraph" id="par_id951587052619162"><emph>end:</emph> Upper bound of a dimension.</paragraph>
+ <paragraph role="paragraph" id="par_id961587051702571">Multiple dimensions for an array are denoted using comma (<emph>,</emph>) sign.</paragraph>
+</section>
+
+<section id="typename">
+ <h4 id="hd_id231587046013458"><variable id="typenameh4">typename fragment</variable></h4>
+ <paragraph role="paragraph" id="par_id501586753339474"><image src="media/helpimg/sbasic/typename_fragment.svg" id="img_id4157296484514"><alt xml-lang="en-US" id="alt_id15152796484515">primitive data types fragment</alt></image></paragraph>
+ <bascode>
+ <paragraph role="bascode" id="par_id3150985" localize="false">{Boolean|Byte|Currency|Date|Double|Integer|Long|Object|Single|String|Variant}</paragraph>
+ </bascode>
+</section>
+
+<section id="char">
+ <h4 id="hd_id231587046013459"><variable id="charh4">char fragment</variable></h4>
+ <paragraph role="paragraph" id="par_id511586753339474"><image src="media/helpimg/sbasic/char_fragment.svg" id="img_id4157296484514"><alt xml-lang="en-US" id="alt_id15152796484516">type declaration characters</alt></image></paragraph>
+ <bascode>
+ <paragraph role="bascode" id="par_id3150986" localize="false">{ % | &amp; | ! | # | $ | @ }</paragraph>
+ </bascode>
+</section>
+
+</body>
+</helpdocument>