summaryrefslogtreecommitdiffstats
path: root/source/text
diff options
context:
space:
mode:
authorLibreOfficiant <LibreOfficiant@sfr.fr>2020-05-04 17:17:09 +0200
committerOlivier Hallot <olivier.hallot@libreoffice.org>2020-05-05 19:59:53 +0200
commit6522d1a261301211b35885ee9709f64f9a587edb (patch)
tree7b7ee6347d535aa95a0626a721f141ca5eea0fbe /source/text
parentVisibility improvements (diff)
downloadhelp-6522d1a261301211b35885ee9709f64f9a587edb.tar.gz
help-6522d1a261301211b35885ee9709f64f9a587edb.zip
tdf#131416 Syntax diagrams
- Print & Select Case statements - GoSub,GoTo, On…GoSub/GoTo statements - section reuse + x-refs Change-Id: I785d46013d7e8e9f571b2a2d2abaa3e2e41d223f Reviewed-on: https://gerrit.libreoffice.org/c/help/+/93376 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'source/text')
-rw-r--r--source/text/sbasic/shared/03010103.xhp17
-rw-r--r--source/text/sbasic/shared/03090102.xhp15
-rw-r--r--source/text/sbasic/shared/03090301.xhp46
-rw-r--r--source/text/sbasic/shared/03090302.xhp61
-rw-r--r--source/text/sbasic/shared/03090303.xhp29
5 files changed, 99 insertions, 69 deletions
diff --git a/source/text/sbasic/shared/03010103.xhp b/source/text/sbasic/shared/03010103.xhp
index 5e7fb6a495..52cccd7ecf 100644
--- a/source/text/sbasic/shared/03010103.xhp
+++ b/source/text/sbasic/shared/03010103.xhp
@@ -42,22 +42,23 @@
<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>
-<paragraph id="hd_id3145785" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+<paragraph role="image" id="par_id841588605629842"><image src="media/helpimg/sbasic/Print_statement.svg" id="img_id931588605629842"><alt id="alt_id931588605629842">Print syntax</alt></image></paragraph>
<bascode>
-<paragraph id="par_id3153188" role="bascode" xml-lang="en-US">Print [#FileName,] Expression1[{;|,} [Spc(Number As Integer);] [Tab(pos As Integer);] [Expression2[...]] </paragraph>
+<paragraph id="par_id3153188" role="bascode" xml-lang="en-US">Print [#filenum,] expression1[{;|,} [Spc(number As Integer);] [Tab(pos As Integer);] [expression2[...]] </paragraph>
</bascode>
-<paragraph id="hd_id3147348" role="heading" level="2" xml-lang="en-US">Parameter:</paragraph>
-<paragraph id="par_id2508621" role="paragraph" xml-lang="en-US"> <emph>FileName:</emph> Any numeric expression that contains the file number that was set by the Open statement for the respective file.<comment>see i61758</comment></paragraph>
-<paragraph id="par_id3163712" role="paragraph" xml-lang="en-US"> <emph>Expression</emph>: Any numeric or string expression to be printed. Multiple expressions can be separated by a semicolon. If separated by a comma, the expressions are indented to the next tab stop. The tab stops cannot be adjusted.</paragraph>
-<paragraph id="par_id3153092" role="paragraph" xml-lang="en-US"> <emph>Number</emph>: Number of spaces to be inserted by the <emph>Spc</emph> function.</paragraph>
-<paragraph id="par_id3145364" role="paragraph" xml-lang="en-US"> <emph>Pos</emph>: Spaces are inserted until the specified position.</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph id="par_id2508621" role="paragraph" xml-lang="en-US"> <emph>filenum:</emph> Any numeric expression that contains the file number that was set by the <literal>Open</literal> statement for the respective file.<comment>see i61758</comment></paragraph>
+<paragraph id="par_id3163712" role="paragraph" xml-lang="en-US"> <emph>expression</emph>: Any numeric or string expression to be printed. Multiple expressions can be separated by a semicolon. If separated by a comma, the expressions are indented to the next tab stop. The tab stops cannot be adjusted.</paragraph>
+<paragraph id="par_id3153092" role="paragraph" xml-lang="en-US"> <emph>number</emph>: Number of spaces to be inserted by the <emph>Spc</emph> function.</paragraph>
+<paragraph id="par_id3145364" role="paragraph" xml-lang="en-US"> <emph>pos</emph>: Spaces are inserted until the specified position.</paragraph>
<paragraph id="par_id3154319" role="paragraph" xml-lang="en-US">If a semicolon or comma appears after the last expression to be printed, $[officename] Basic stores the text in an internal buffer and continues program execution without printing. When another Print statement without a semicolon or comma at the end is encountered, all text to be printed is printed at once.</paragraph>
<paragraph id="par_id3145272" role="paragraph" xml-lang="en-US">Positive numeric expressions are printed with a leading space. Negative expressions are printed with a leading minus sign. If a certain range is exceeded for floating-point values, the respective numeric expression is printed in exponential notation.</paragraph>
<paragraph id="par_id3154011" role="paragraph" xml-lang="en-US">If the expression to be printed exceeds a certain length, the display will automatically wrap to the next line.</paragraph>
<paragraph id="par_id3146969" role="note" xml-lang="en-US">You can insert the <emph>Tab</emph> function, enclosed by semicolons, between arguments to indent the output to a specific position, or you can use the <emph>Spc</emph> function to insert a specified number of spaces.</paragraph>
-<paragraph id="hd_id3146912" role="heading" level="2" xml-lang="en-US">Example:</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<switch select="sys">
<case select="WIN">
<bascode>
diff --git a/source/text/sbasic/shared/03090102.xhp b/source/text/sbasic/shared/03090102.xhp
index 97f6eeaec4..7d9eb53cc2 100644
--- a/source/text/sbasic/shared/03090102.xhp
+++ b/source/text/sbasic/shared/03090102.xhp
@@ -30,8 +30,8 @@
<section id="selectcase">
<bookmark xml-lang="en-US" branch="index" id="bm_id3149416">
- <bookmark_value>Select...Case statement</bookmark_value>
- <bookmark_value>Case statement</bookmark_value>
+ <bookmark_value>Select Case statement</bookmark_value>
+ <bookmark_value>Case keyword; in Select Case statement</bookmark_value>
</bookmark>
@@ -39,16 +39,17 @@
<paragraph id="par_id3153896" role="paragraph" xml-lang="en-US">Defines one or more statement blocks depending on the value of an expression.</paragraph>
</section>
-<paragraph id="hd_id3147265" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+<paragraph role="image" id="par_id841588605629842"><image src="media/helpimg/sbasic/Select-Case_statement.svg" id="img_id931588605629842"><alt id="alt_id931588605629842">Select Case syntax</alt></image></paragraph>
<bascode>
<paragraph id="par_id3150400" role="bascode" xml-lang="en-US">Select Case condition Case expression Statement Block [Case expression2 Statement Block][Case Else] Statement Block End Select</paragraph>
</bascode>
-<paragraph id="hd_id3150767" role="heading" level="2" xml-lang="en-US">Parameters:</paragraph>
-<paragraph id="par_id3156281" role="paragraph" xml-lang="en-US"> <emph>Condition:</emph> Any expression that controls if the statement block that follows the respective Case clause is executed.</paragraph>
-<paragraph id="par_id3150448" role="paragraph" xml-lang="en-US"> <emph>Expression:</emph> Any expression that is compatible with the Condition type expression. The statement block that follows the Case clause is executed if <emph>Condition</emph> matches <emph>Expression</emph>.</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+<paragraph id="par_id3156281" role="paragraph" xml-lang="en-US"> <emph>condition:</emph> Any expression that controls if the statement block that follows the respective Case clause is executed.</paragraph>
+ <paragraph id="par_id3150448" role="paragraph" xml-lang="en-US"> <emph>expression:</emph> Any expression that is compatible with the condition type expression. The statement block that follows the <literal>Case</literal> clause is executed if <emph>condition</emph> matches <emph>expression</emph>.</paragraph>
-<paragraph id="hd_id3153768" role="heading" level="2" xml-lang="en-US">Example:</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph id="par_idm1341173760" role="bascode" localize="false" xml-lang="en-US">Sub ExampleRandomSelect</paragraph>
<paragraph id="par_idm1341172528" role="bascode" localize="false" xml-lang="en-US">Dim iVar As Integer</paragraph>
diff --git a/source/text/sbasic/shared/03090301.xhp b/source/text/sbasic/shared/03090301.xhp
index 7335110a23..b2331842bc 100644
--- a/source/text/sbasic/shared/03090301.xhp
+++ b/source/text/sbasic/shared/03090301.xhp
@@ -27,38 +27,40 @@
<body>
-
<section id="gosubreturn">
<bookmark xml-lang="en-US" branch="index" id="bm_id3147242">
<bookmark_value>GoSub...Return statement</bookmark_value>
+ <bookmark_value>label; in GoSub...Return statement</bookmark_value>
</bookmark>
-
-<paragraph id="hd_id3147242" role="heading" level="1" xml-lang="en-US"><link href="text/sbasic/shared/03090301.xhp" name="GoSub...Return Statement">GoSub...Return Statement</link></paragraph>
-<paragraph id="par_id3145316" role="paragraph" xml-lang="en-US">Calls a subroutine that is indicated by a label from a subroutine or a function. The statements following the label are executed until the next Return statement. Afterwards, the program continues with the statement that follows the <emph>GoSub </emph>statement.</paragraph>
+<h1 id="hd_id3147242" xml-lang="en-US"><variable id="GoSubh1"><link href="text/sbasic/shared/03090301.xhp" name="GoSub...Return Statement">GoSub...Return Statement</link></variable></h1>
+ <paragraph id="par_id3145316" role="paragraph" xml-lang="en-US">Calls a subroutine that is indicated by a label inside a <literal>Sub</literal> or a <literal>Function</literal>. The statements following the label are executed until the next <literal>Return</literal> statement. Afterwards, the program continues with the statement that follows the <literal>GoSub</literal> statement.</paragraph>
</section>
-<paragraph id="hd_id3145609" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+<bascode>
+<paragraph id="par_id3145069" role="bascode" xml-lang="en-US">GoSub label[:]</paragraph>
+</bascode>
+
+<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+<paragraph role="paragraph" id="par_id471588670859073"><emph>label: </emph>A line identifier indicating where to continue execution. The scope of a label in that of the routine it belongs to.</paragraph>
+<paragraph id="par_id3147318" role="paragraph" xml-lang="en-US">The <literal>GoSub</literal> statement calls a local subroutine indicated by a label from within a subroutine or a function. The name of the label must end with a colon (":").</paragraph>
<bascode>
-<paragraph id="par_id3145069" role="bascode" xml-lang="en-US">see Parameters</paragraph>
+ <paragraph role="bascode" id="bas_id171588670446922" localize="false">Sub/Function foo</paragraph>
+ <paragraph role="bascode" id="bas_id411588670455217" xml-lang="en-US"> ' statements</paragraph>
+ <paragraph role="bascode" id="bas_id315886704565218" localize="false"> GoSub label</paragraph>
+ <paragraph role="bascode" id="bas_id421588670457589" xml-lang="en-US"> ' statements </paragraph>
+ <paragraph role="bascode" id="bas_id551588670457866" localize="false"> Exit Sub/Function</paragraph>
+ <paragraph role="bascode" id="bas_id721588670458055" localize="false">label:</paragraph>
+ <paragraph role="bascode" id="bas_id171588670458263" xml-lang="en-US"> ' statements </paragraph>
+ <paragraph role="bascode" id="bas_id881588670473041" localize="false"> Return</paragraph>
+ <paragraph role="bascode" id="bas_id661588670476240" localize="false">End Sub/Function</paragraph>
</bascode>
-<paragraph id="hd_id3147265" role="heading" level="2" xml-lang="en-US">Parameters:</paragraph>
-<paragraph id="par_id3148664" role="paragraph" xml-lang="en-US">Sub/Function</paragraph>
-<paragraph id="par_id3150400" role="paragraph" xml-lang="en-US">statement block</paragraph>
-<paragraph id="par_id3154140" role="paragraph" xml-lang="en-US"> Label</paragraph>
-<paragraph id="par_id3150869" role="paragraph" xml-lang="en-US">statement block</paragraph>
-<paragraph id="par_id3154909" role="paragraph" xml-lang="en-US">GoSub Label</paragraph>
-<paragraph id="par_id3153969" role="paragraph" xml-lang="en-US">Exit Sub/Function</paragraph>
-<paragraph id="par_id3154685" role="paragraph" xml-lang="en-US">Label:</paragraph>
-<paragraph id="par_id3145786" role="paragraph" xml-lang="en-US">statement block</paragraph>
-<paragraph id="par_id3159252" role="paragraph" xml-lang="en-US">Return</paragraph>
-<paragraph id="par_id3154321" role="paragraph" xml-lang="en-US">End Sub/Function</paragraph>
-<paragraph id="par_id3147318" role="paragraph" xml-lang="en-US">The <emph>GoSub</emph> statement calls a local subroutine indicated by a label from within a subroutine or a function. The name of the label must end with a colon (":").</paragraph>
<paragraph id="par_id3153190" role="warning" xml-lang="en-US">If the program encounters a Return statement not preceded by <emph>GoSub</emph>, $[officename] Basic returns an error message. Use <emph>Exit Sub</emph> or <emph>Exit Function</emph> to ensure that the program leaves a Sub or Function before reaching the next Return statement.</paragraph>
<paragraph id="par_id3145799" role="paragraph" xml-lang="en-US">The following example demonstrates the use of <emph>GoSub</emph> and <emph>Return</emph>. By executing a program section twice, the program calculates the square root of two numbers that are entered by the user.</paragraph>
-<paragraph id="hd_id3156284" role="heading" level="2" xml-lang="en-US">Example:</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph id="par_idm1341591488" role="bascode" localize="false" xml-lang="en-US">Sub ExampleGoSub</paragraph>
<paragraph id="par_idm1341590256" role="bascode" localize="false" xml-lang="en-US">Dim iInputa As Single</paragraph>
@@ -78,6 +80,12 @@
<paragraph id="par_idm1341570912" role="bascode" localize="false" xml-lang="en-US"> Return</paragraph>
<paragraph id="par_idm1341569680" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph>
</bascode>
+
+<section id="relatedtopics">
+ <embed href="text/sbasic/shared/03090302.xhp#GoToh1"/>
+ <embed href="text/sbasic/shared/03090303.xhp#OnGoSubGoToh1"/>
+</section>
+
</body>
</helpdocument> \ No newline at end of file
diff --git a/source/text/sbasic/shared/03090302.xhp b/source/text/sbasic/shared/03090302.xhp
index 44ada012a9..720aa3fdcc 100644
--- a/source/text/sbasic/shared/03090302.xhp
+++ b/source/text/sbasic/shared/03090302.xhp
@@ -19,40 +19,53 @@
-->
<helpdocument version="1.0">
+
<meta>
-<topic id="textsbasicshared03090302xml" indexer="include" status="PUBLISH">
-<title id="tit" xml-lang="en-US">GoTo Statement</title>
-<filename>/text/sbasic/shared/03090302.xhp</filename>
-</topic>
-<history>
-<created date="2003-10-31T00:00:00">Sun Microsystems, Inc.</created>
-</history>
+ <topic id="textsbasicshared03090302xml" indexer="include" status="PUBLISH">
+ <title id="tit" xml-lang="en-US">GoTo Statement</title>
+ <filename>/text/sbasic/shared/03090302.xhp</filename>
+ </topic>
+ <history>
+ <created date="2003-10-31T00:00:00">Sun Microsystems, Inc.</created>
+ </history>
</meta>
+
<body>
<section id="goto">
-<bookmark xml-lang="en-US" branch="index" id="bm_id3159413"><bookmark_value>GoTo statement</bookmark_value>
+<bookmark xml-lang="en-US" branch="index" id="bm_id3159413">
+ <bookmark_value>GoTo statement</bookmark_value>
+ <bookmark_value>label; in GoTo statement</bookmark_value>
</bookmark>
-<paragraph role="heading" id="hd_id3159413" xml-lang="en-US" level="1"><link href="text/sbasic/shared/03090302.xhp" name="GoTo Statement">GoTo Statement</link></paragraph>
-<paragraph role="paragraph" id="par_id3153379" xml-lang="en-US">Continues program execution within a Sub or Function at the procedure line indicated by a label.</paragraph>
+<paragraph role="heading" id="hd_id3159413" xml-lang="en-US" level="1"><variable id="GoToh1"><link href="text/sbasic/shared/03090302.xhp" name="GoTo Statement">GoTo Statement</link></variable></paragraph>
+ <paragraph role="paragraph" id="par_id3153379" xml-lang="en-US">Continues program execution within a <literal>Sub</literal> or <literal>Function</literal> at the procedure line indicated by a label.</paragraph>
</section>
<paragraph role="heading" id="hd_id3149656" xml-lang="en-US" level="2">Syntax:</paragraph>
-<paragraph role="paragraph" id="par_id3154367" xml-lang="en-US">see Parameters</paragraph>
+<bascode>
+<paragraph role="bascode" id="bas_id211588675705501" localize="false">GoTo label[:]</paragraph>
+</bascode>
+
<paragraph role="heading" id="hd_id3150870" xml-lang="en-US" level="2">Parameters:</paragraph>
+<paragraph role="paragraph" id="par_id471588670859073"><emph>label: </emph>A line identifier indicating where to continue execution. The scope of a label in that of the routine it belongs to.</paragraph>
+ <paragraph role="paragraph" id="par_id3152596" xml-lang="en-US">Use the <literal>GoTo</literal> statement to instruct $[officename] Basic to continue program execution at another place within the procedure. The position must be indicated by a label. To set a label, assign a name, and then and end it with a colon (":").</paragraph>
+ <paragraph role="warning" id="par_id3155416" xml-lang="en-US">You cannot use the <literal>GoTo</literal> statement to jump out of a <literal>Sub</literal> or <literal>Function</literal>.</paragraph>
+<paragraph role="heading" id="hd_id3154731" xml-lang="en-US" level="2">Example:</paragraph>
<bascode>
- <paragraph role="bascode" localize="false" id="par_id3156214" xml-lang="en-US">Sub/Function</paragraph>
- <paragraph role="bascode" id="par_id3156424" xml-lang="en-US">statement block</paragraph>
- <paragraph role="bascode" id="par_id3154685" xml-lang="en-US"> Label1</paragraph>
- <paragraph role="bascode" id="par_id3145786" xml-lang="en-US"><emph>Label2:</emph></paragraph>
- <paragraph role="bascode" id="par_id3161832" xml-lang="en-US">statement block</paragraph>
- <paragraph role="bascode" localize="false" id="par_id3146120" xml-lang="en-US">Exit Sub</paragraph>
- <paragraph role="bascode" id="par_id3150010" xml-lang="en-US"><emph>Label1:</emph></paragraph>
- <paragraph role="bascode" id="par_id3152462" xml-lang="en-US">statement block</paragraph>
- <paragraph role="bascode" id="par_id3149664" xml-lang="en-US">GoTo Label2</paragraph>
+ <paragraph role="bascode" id="par_id3156214" localize="false">Sub/Function</paragraph>
+ <paragraph role="bascode" id="par_id3156424" xml-lang="en-US"> ' statement block</paragraph>
+ <paragraph role="bascode" id="par_id3154685" localize="false"> GoTo Label1</paragraph>
+ <paragraph role="bascode" id="par_id3145786" localize="false">Label2:</paragraph>
+ <paragraph role="bascode" id="par_id3161832" xml-lang="en-US"> ' statement block</paragraph>
+ <paragraph role="bascode" id="par_id3146120" localize="false"> Exit Sub/Function</paragraph>
+ <paragraph role="bascode" id="par_id3150010" localize="false">Label1:</paragraph>
+ <paragraph role="bascode" id="par_id3152462" xml-lang="en-US"> ' statement block</paragraph>
+ <paragraph role="bascode" id="par_id3149664" localize="false"> GoTo Label2</paragraph>
<paragraph role="bascode" localize="false" id="par_id3152886" xml-lang="en-US">End Sub/Function</paragraph>
</bascode>
-<paragraph role="paragraph" id="par_id3152596" xml-lang="en-US">Use the GoTo statement to instruct $[officename] Basic to continue program execution at another place within the procedure. The position must be indicated by a label. To set a label, assign a name, and then and end it with a colon (":").</paragraph>
-<paragraph role="warning" id="par_id3155416" xml-lang="en-US">You cannot use the GoTo statement to jump out of a Sub or Function.</paragraph>
-<paragraph role="heading" id="hd_id3154731" xml-lang="en-US" level="2">Example:</paragraph>
-<paragraph role="paragraph" id="par_id6967035" xml-lang="en-US">see Parameters</paragraph>
+
+<section id="relatedtopics">
+ <embed href="text/sbasic/shared/03090301.xhp#GoSubh1"/>
+ <embed href="text/sbasic/shared/03090303.xhp#OnGoSubGoToh1"/>
+</section>
+
</body>
</helpdocument>
diff --git a/source/text/sbasic/shared/03090303.xhp b/source/text/sbasic/shared/03090303.xhp
index ea82af131a..cad7a574fb 100644
--- a/source/text/sbasic/shared/03090303.xhp
+++ b/source/text/sbasic/shared/03090303.xhp
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
-<helpdocument version="1.0">
<!--
* This file is part of the LibreOffice project.
*
@@ -17,6 +16,7 @@
* 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="textsbasicshared03090303xml" indexer="include" status="PUBLISH">
@@ -27,30 +27,32 @@
<body>
-
<section id="ongosub">
<bookmark xml-lang="en-US" branch="index" id="bm_id3153897">
<bookmark_value>On...GoSub statement</bookmark_value>
<bookmark_value>On...GoTo statement</bookmark_value>
+ <bookmark_value>label; in On...GoSub statement</bookmark_value>
+ <bookmark_value>label; in On...GoTo statement</bookmark_value>
</bookmark>
-<paragraph id="hd_id3153897" role="heading" level="1" xml-lang="en-US"><link href="text/sbasic/shared/03090303.xhp" name="On...GoSub Statement; On...GoTo Statement">On...GoSub Statement; On...GoTo Statement</link></paragraph>
+<h1 id="hd_id3153897" xml-lang="en-US"><variable id="OnGoSubGoToh1"><link href="text/sbasic/shared/03090303.xhp" name="On...GoSub Statement; On...GoTo Statement">On...GoSub Statement; On...GoTo Statement</link></variable></h1>
<paragraph id="par_id3150359" role="paragraph" xml-lang="en-US">Branches to one of several specified lines in the program code, depending on the value of a numeric expression.</paragraph>
</section>
-<paragraph id="hd_id3148798" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+<paragraph role="image" id="par_id841588605629842"><image src="media/helpimg/sbasic/On-GoSub-GoTo_statement.svg" id="img_id931588605629842"><alt id="alt_id931588605629842">On GoSub/GoTo syntax</alt></image></paragraph>
<bascode>
-<paragraph id="par_id3154366" role="bascode" xml-lang="en-US">On N GoSub Label1[, Label2[, Label3[,...]]]</paragraph>
-<paragraph id="par_id3150769" role="bascode" xml-lang="en-US">On NumExpression GoTo Label1[, Label2[, Label3[,...]]]</paragraph>
+<paragraph id="par_id3154366" role="bascode" xml-lang="en-US">On expression GoSub Label1[, Label2[, Label3[,...]]]</paragraph>
+<paragraph id="par_id3150769" role="bascode" xml-lang="en-US">On expression GoTo Label1[, Label2[, Label3[,...]]]</paragraph>
</bascode>
-<paragraph id="hd_id3156215" role="heading" level="2" xml-lang="en-US">Parameters:</paragraph>
-<paragraph id="par_id3148673" role="paragraph" xml-lang="en-US"> <emph>NumExpression:</emph> Any numeric expression between 0 and 255 that determines which of the lines the program branches to. If NumExpression is 0, the statement is not executed. If NumExpression is greater than 0, the program jumps to the label that has a position number that corresponds to the expression (1 = First label; 2 = Second label)</paragraph>
-<paragraph id="par_id3153194" role="paragraph" xml-lang="en-US"> <emph>Label:</emph> Target line according to<emph> GoTo </emph>or <emph>GoSub</emph> structure.</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+<paragraph id="par_id3148673" role="paragraph" xml-lang="en-US"> <emph>expression:</emph> Any numeric expression between 0 and 255 that determines which of the lines the program branches to. If <emph>expression</emph> is 0, the statement is not executed. If <emph>expression</emph> is greater than 0, the program jumps to the label that has a position number that corresponds to the expression (1 = First label; 2 = Second label)</paragraph>
+<paragraph id="par_id3153194" role="paragraph" xml-lang="en-US"> <emph>label:</emph> Target line according to<emph> GoTo </emph>or <emph>GoSub</emph> structure.</paragraph>
<paragraph id="par_id3156442" role="note" xml-lang="en-US">The <emph>GoTo</emph> or <emph>GoSub </emph>conventions are valid.</paragraph>
-<paragraph id="hd_id3148645" role="heading" level="2" xml-lang="en-US">Example:</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
<paragraph id="par_idm1341610144" role="bascode" localize="false" xml-lang="en-US">Sub ExampleOnGosub</paragraph>
<paragraph id="par_idm1341608912" role="bascode" localize="false" xml-lang="en-US">Dim iVar As Integer</paragraph>
@@ -72,6 +74,11 @@
<paragraph id="par_idm1341586896" role="bascode" localize="false" xml-lang="en-US"> MsgBox sVar,0,"On...GoSub"</paragraph>
<paragraph id="par_idm1341585648" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph>
</bascode>
+
+<section id="relatedtopics">
+ <embed href="text/sbasic/shared/03090301.xhp#GoSubh1"/>
+ <embed href="text/sbasic/shared/03090302.xhp#GoToh1"/>
+</section>
+
</body>
-
</helpdocument> \ No newline at end of file