diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /helpcontent2/source/text/sbasic/shared/fragments.xhp | |
parent | Initial commit. (diff) | |
download | libreoffice-upstream.tar.xz libreoffice-upstream.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
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.xhp | 70 |
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 000000000..9da8abd51 --- /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" name="Syntax fragments">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" name="arguments in Function, Sub and Property statements"></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" name ="Option Compatible">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" name ="Option VBASupport">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" name="array syntax fragment">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">{ % | & | ! | # | $ | @ }</paragraph> + </bascode> +</section> + +</body> +</helpdocument> |