[Libreoffice-commits] help.git: source/text

LibreOfficiant (via logerrit) logerrit at kemper.freedesktop.org
Tue Apr 7 22:48:10 UTC 2020


 source/text/sbasic/shared/03090401.xhp |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 2748a458c312743c81f295e170aa26f626d2bff7
Author:     LibreOfficiant <LibreOfficiant at sfr.fr>
AuthorDate: Sat Apr 4 14:03:17 2020 +0100
Commit:     Olivier Hallot <olivier.hallot at libreoffice.org>
CommitDate: Wed Apr 8 00:47:50 2020 +0200

    Precise Call statement options
    
    - Document keyword args as opposed to positional args
    - Explicit parentheses/brackets usage
    - Display DLLs stuff under Win context
      ..not so certain this is needed in light of Mono/Linux mixed env.
    
    Change-Id: Iee2f0088e3a560212bb6f2dd15e76b95ba652d48
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/91706
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>

diff --git a/source/text/sbasic/shared/03090401.xhp b/source/text/sbasic/shared/03090401.xhp
index b63978d0c..662580d96 100644
--- a/source/text/sbasic/shared/03090401.xhp
+++ b/source/text/sbasic/shared/03090401.xhp
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
 <!--
  * This file is part of the LibreOffice project.
  *
@@ -17,7 +16,6 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  -->
-
 <helpdocument version="1.0">
 <meta>
 <topic id="textsbasicshared03090401xml" indexer="include" status="PUBLISH">
@@ -33,7 +31,7 @@
 <bookmark xml-lang="en-US" branch="index" id="bm_id3154422"><bookmark_value>Call statement</bookmark_value>
 </bookmark>
 <paragraph role="heading" id="hd_id3154422" xml-lang="en-US" level="1"><link href="text/sbasic/shared/03090401.xhp" name="Call Statement">Call Statement</link></paragraph>
-<paragraph role="paragraph" id="par_id3153394" xml-lang="en-US">Transfers the control of the program to a subroutine, a function, or a DLL procedure.</paragraph>
+<paragraph role="paragraph" id="par_id3153394" xml-lang="en-US">Transfers the control of the program to a subroutine, a function, or a procedure of a <link href="text/sbasic/shared/03090403.xhp" name="Dynamic Link Library">Dynamic Link Library (DLL)</link>. The keyword, type and number of parameters is dependent on the routine that is being called.</paragraph>
 </section>
 <paragraph role="heading" id="hd_id3153345" xml-lang="en-US" level="2">Syntax:</paragraph>
 <paragraph role="paragraph" id="par_id491585753339474">
@@ -43,21 +41,23 @@
 </bascode>
 <paragraph role="heading" id="hd_id3150771" xml-lang="en-US" level="2">Parameters:</paragraph>
 <paragraph role="paragraph" id="par_id3148473" xml-lang="en-US">
-<emph>name:</emph> Name of the subroutine, the function, or the DLL that you want to call</paragraph>
+<emph>name:</emph> Name of the subroutine, the function, or the <link href="text/sbasic/shared/03090403.xhp" name="Dynamic Link Library">DLL</link> that you want to call</paragraph>
 <paragraph role="paragraph" id="par_id3148946" xml-lang="en-US">
-<emph>param:</emph> Parameters to pass to the procedure. The keyword, type and number of parameters is dependent on the routine that is being called.</paragraph>
-<paragraph role="note" id="par_id3154216" xml-lang="en-US">A keyword is optional when you call a procedure. If a function is executed as an expression, the parameters must be enclosed by brackets in the statement. If a DLL is called, it must first be specified in the <emph>Declare-Statement</emph>.</paragraph>
+<emph>param:</emph> Keyword parameter name to pass to the routine, followed by its <emph>value</emph>. The name must match the routine declaration. Keywords are optional and can be used in any order. </paragraph>
+<paragraph role="paragraph" id="par_id871586190690812"><emph>value:</emph> Positional parameter value. The type is dependent on the routine that is being called</paragraph>
+<note id="par_id421586006407428" xml-lang="en-US">When mixing positional and keyword parameters, make sure positional parameters are following the routine declaration order.</note>
+<tip id="par_id3154216" xml-lang="en-US">When a function is used as an expression, enclosing parameters with brackets becomes necessary. Using a <link href="text/sbasic/shared/03090403.xhp" name="Declare Statement">Declare statement</link> is compulsory prior to call a DLL.</tip>
 <paragraph role="heading" id="hd_id3125865" xml-lang="en-US" level="2">Example:</paragraph>
 <bascode>
 <paragraph role="bascode" id="par_id3159254" xml-lang="en-US" localize="false">Sub ExampleCall</paragraph>
-<paragraph role="bascode" id="par_id3161832" xml-lang="en-US" localize="false">Dim sVar As String</paragraph>
-<paragraph role="bascode" id="par_id3147317" xml-lang="en-US" localize="false">    sVar = "LibreOffice"</paragraph>
-<paragraph role="bascode" id="par_id3145273" xml-lang="en-US" localize="false">    Call f_callFun sVar</paragraph>
-<paragraph role="bascode" id="bas_id181585749262948" xml-lang="en-US" localize="false">    f_callFun sText := sVar</paragraph>
+<paragraph role="bascode" id="par_id3161832" xml-lang="en-US" localize="false">    Dim value As String</paragraph>
+<paragraph role="bascode" id="par_id3147317" xml-lang="en-US" localize="false">    value = "LibreOffice"</paragraph>
+<paragraph role="bascode" id="par_id3145273" xml-lang="en-US" localize="false">    Call aRoutine value</paragraph>
+<paragraph role="bascode" id="bas_id181585749262948" xml-lang="en-US" localize="false">    aRoutine text := value</paragraph>
 <paragraph role="bascode" id="par_id3147435" xml-lang="en-US" localize="false">End Sub</paragraph>
 <paragraph role="bascode" id="par_id3147436" xml-lang="en-US" localize="false"></paragraph>
-<paragraph role="bascode" id="par_id3155414" xml-lang="en-US" localize="false">Sub f_callFun (sText as String)</paragraph>
-<paragraph role="bascode" id="par_id3151112" xml-lang="en-US" localize="false">    Msgbox sText</paragraph>
+<paragraph role="bascode" id="par_id3155414" xml-lang="en-US" localize="false">Sub aRoutine (text as String)</paragraph>
+<paragraph role="bascode" id="par_id3151112" xml-lang="en-US" localize="false">    Msgbox text</paragraph>
 <paragraph role="bascode" id="par_id3148646" xml-lang="en-US" localize="false">End Sub</paragraph>
 </bascode>
 </body>


More information about the Libreoffice-commits mailing list