diff options
author | Alain Romedenne <LibreOfficiant@sfr.fr> | 2020-07-09 09:37:11 +0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@libreoffice.org> | 2020-07-09 17:26:05 +0200 |
commit | 290bab91dab73ea80e595c3b284926c7e01b35d1 (patch) | |
tree | c7afb78c9774a3a1ae583256910d1b7c648aa160 /source/text | |
parent | 5907932eac35843d0cd88adea09ba8890ed59884 (diff) |
tdf#131416 How to read syntax diagrams
Change-Id: Ic8ec05c75658f600f5ea1509acb482cc3db5d796
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/98343
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'source/text')
-rw-r--r-- | source/text/sbasic/shared/03010103.xhp | 2 | ||||
-rw-r--r-- | source/text/sbasic/shared/03090406.xhp | 2 | ||||
-rw-r--r-- | source/text/sbasic/shared/03090409.xhp | 4 | ||||
-rw-r--r-- | source/text/sbasic/shared/conventions.xhp | 66 |
4 files changed, 70 insertions, 4 deletions
diff --git a/source/text/sbasic/shared/03010103.xhp b/source/text/sbasic/shared/03010103.xhp index 52cccd7ecf..e49aabc4fa 100644 --- a/source/text/sbasic/shared/03010103.xhp +++ b/source/text/sbasic/shared/03010103.xhp @@ -38,7 +38,7 @@ </bookmark> -<paragraph id="hd_id3147230" role="heading" level="1" xml-lang="en-US"><link href="text/sbasic/shared/03010103.xhp" name="Print Statement">Print Statement</link></paragraph> +<h1 id="hd_id3147230" xml-lang="en-US"><variable id="Print_h1"><link href="text/sbasic/shared/03010103.xhp" name="Print Statement">Print Statement</link></variable></h1> <paragraph id="par_id3156281" role="paragraph" xml-lang="en-US">Outputs the specified strings or numeric expressions to a dialog or to a file.</paragraph> </section> diff --git a/source/text/sbasic/shared/03090406.xhp b/source/text/sbasic/shared/03090406.xhp index eb10a54c33..859d4e34b4 100644 --- a/source/text/sbasic/shared/03090406.xhp +++ b/source/text/sbasic/shared/03090406.xhp @@ -37,7 +37,7 @@ </section> <section id="TwinMethods"> -<note id="par_id661588586825434"><literal>Sub</literal> or <literal>Function</literal> statements are similar methods, without distinction. They receive parameters by reference allowing them to be modified. %PRODUCTNAME Basic compiler accepts their respective syntax to be used interchangeably.</note> +<note id="par_id661588586825434"><literal>Sub</literal>, <literal>Function</literal> or <literal>Property</literal> statements are similar methods, without distinction. They receive parameters by reference allowing them to be modified in return. %PRODUCTNAME Basic compiler accepts their respective argument syntax to be used interchangeably.</note> </section> <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/> diff --git a/source/text/sbasic/shared/03090409.xhp b/source/text/sbasic/shared/03090409.xhp index 9dbe587897..89d4086d36 100644 --- a/source/text/sbasic/shared/03090409.xhp +++ b/source/text/sbasic/shared/03090409.xhp @@ -32,10 +32,10 @@ <bookmark_value>Sub statement</bookmark_value> </bookmark> -<paragraph id="hd_id3147226" role="heading" level="1" xml-lang="en-US"><link href="text/sbasic/shared/03090409.xhp" name="Sub Statement">Sub Statement</link></paragraph> +<h1 id="hd_id3147226"><variable id="Sub_h1"><link href="text/sbasic/shared/03090409.xhp" name="Sub Statement">Sub Statement</link></variable></h1> <paragraph id="par_id3153311" role="paragraph" xml-lang="en-US">Defines a subroutine.</paragraph> </section> -<embed href="text/sbasic/shared/03090406.xhp#TwinMethods"/> +<embed href="text/sbasic/shared/03090406.xhp#TwinMethods"/> <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/> <paragraph role="paragraph" id="par_id971587473488701"> diff --git a/source/text/sbasic/shared/conventions.xhp b/source/text/sbasic/shared/conventions.xhp new file mode 100644 index 0000000000..e1df81afaf --- /dev/null +++ b/source/text/sbasic/shared/conventions.xhp @@ -0,0 +1,66 @@ +<?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.Help.conventions"> + <title id="tit" xml-lang="en-US"></title> + <filename>/text/sbasic/shared/conventions.xhp</filename> + </topic> + </meta> + <body> + <bookmark xml-lang="en-US" branch="index" id="bm_id861593777289558"> + <bookmark_value>Syntax diagrams; How to read</bookmark_value> + <bookmark_value>Statements syntax;How to read</bookmark_value> + <bookmark_value>Typographical conventions</bookmark_value> + </bookmark> + <h1 id="hd_id221543446540070"><link href="text/sbasic/shared/conventions.xhp" name="conventions">How to Read Syntax Diagrams and Statements</link></h1> + <paragraph role="paragraph" id="par_id601593699108443">%PRODUCTNAME Basic statements use syntax diagrams and textual conventions that follow these typographical rules:</paragraph> + <list type="unordered"> + <listitem><paragraph id="par_id158193699546735" role="listitem">LibreOffice Basic keywords or functions use propercasing: Call, DimArray, InputBox, Property.</paragraph></listitem> + <listitem><paragraph id="par_id711593699548486" role="listitem">Lowercase characters indicate information to supply: end, expression, start, variable.</paragraph></listitem> + </list> + <paragraph role="paragraph" id="par_id881593760345504">The syntax of a %PRODUCTNAME Basic one line statement is illustrated herewith:</paragraph> + + <h2 id="hd_id871593700670279">Diagram example</h2> + <list type="unordered"> + <listitem><paragraph id="par_id181593699574635" role="listitem">Basic statement diagrams start and end with double vertical bars,</paragraph></listitem> + <listitem><paragraph id="par_id711596399548486" role="listitem">Loops indicate a possible repetition, an optional separator may be present,</paragraph></listitem> + <listitem><paragraph id="par_id541593706654897" role="listitem">Rectangles denote subsequent diagram fragments,</paragraph></listitem> + <listitem><paragraph id="par_id251593706717957" role="listitem">Diagram fragments extremities exhibit single vertical bars.</paragraph></listitem> + </list> + <paragraph role="image" id="par_id831588865616326"><image src="media/helpimg/sbasic/a_statement.svg" id="img_id651588865616326"><alt id="alt_id281588865616326">syntax of a statement</alt></image></paragraph> + <paragraph role="paragraph" id="par_id411579301639711">A set of %PRODUCTNAME Basic statements - with optional labels - is using a colon <literal>:</literal> sign to separate them, it can be terminated with an optional comment. <literal>REM</literal> or an apostrophe sign introduce a comment.</paragraph> + <paragraph role="image" id="par_id931593707147102"><image src="media/helpimg/sbasic/comment_fragment.svg" id="img_id191593707147102"><alt id="alt_id111593707147102">diagram fragment</alt></image></paragraph> + + <h2 id="hd_id71593700691968">Textual example</h2> + <list type="unordered"> + <listitem><paragraph id="par_id181593700546735" role="listitem"><emph>[opt1|opt2|opt3]</emph> Items inside brackets are optional, alternatives are indicated with a vertical bar,</paragraph></listitem> + <listitem><paragraph id="par_id181593699546735" role="listitem"><emph>case[[sep]…]</emph> An ellipsis indicates a possible repetition, an optional separator may be specified,</paragraph></listitem> + <listitem><paragraph id="par_id712593699548486" role="listitem"><emph>{choice1|choice2}</emph> Items inside curly braces are compulsory, alternatives are indicated with a vertical bar.</paragraph></listitem> + </list> + <paragraph role="paragraph" id="par_id881593759547050" localize="false"><literal>[ [[label:] statement] : ] [{REM|'} text]</literal></paragraph> + <paragraph role="paragraph" id="par_id411593701639711">A set of %PRODUCTNAME Basic statements - with optional labels - is using a colon <literal>:</literal> sign to separate them, it can be terminated with an optional comment. <literal>REM</literal> or an apostrophe sign introduce a comment.</paragraph> + + <embed href="text/sbasic/shared/00000003.xhp#functexample"/> + <bascode> + <paragraph role="bascode" id="N0008" localize="false">Sub Main<br/></paragraph> + <paragraph role="bascode" id="N0018" xml-lang="en-US"> GoTo there ' skip first statement</paragraph> + <paragraph role="bascode" id="N0019" xml-lang="en-US"> here: Print 1, : there: Print 2 REM explanatory text here</paragraph> + <paragraph role="bascode" id="N0021" localize="false">End Sub</paragraph> + </bascode> + + <section id="relatedtopics" > + <embed href="text/sbasic/shared/03090302.xhp#GoToh1"/> + <embed href="text/sbasic/shared/03010103.xhp#Print_h1"/> + <embed href="text/sbasic/shared/03090407.xhp#remstatement"/> + <embed href="text/sbasic/shared/03090409.xhp#Sub_h1"/> + </section> +</body> +</helpdocument>
\ No newline at end of file |