summaryrefslogtreecommitdiff
path: root/source/text/sbasic
diff options
context:
space:
mode:
authorAlain Romedenne <LibreOfficiant@sfr.fr>2020-07-28 17:17:19 +0200
committerOlivier Hallot <olivier.hallot@libreoffice.org>2020-08-03 15:35:58 +0200
commitf0fc51ab506034db25dd325a3b3b0e123af62e98 (patch)
tree266363ce7744404eb2f6f8f7f1524bc9aef9c0e3 /source/text/sbasic
parentdc36eea48b4a2120911d0f99322ff4a35ea39eb6 (diff)
tdf131416 Basic syntax diagrams
- Close, Get, Put and Open statements Change-Id: I09a89ededbf65c41a65e3d347111c9dac10cfdde Reviewed-on: https://gerrit.libreoffice.org/c/help/+/99601 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'source/text/sbasic')
-rw-r--r--source/text/sbasic/shared/03020101.xhp43
-rw-r--r--source/text/sbasic/shared/03020103.xhp71
-rw-r--r--source/text/sbasic/shared/03020201.xhp73
-rw-r--r--source/text/sbasic/shared/03020204.xhp58
4 files changed, 112 insertions, 133 deletions
diff --git a/source/text/sbasic/shared/03020101.xhp b/source/text/sbasic/shared/03020101.xhp
index 608027d66f..79247f40ca 100644
--- a/source/text/sbasic/shared/03020101.xhp
+++ b/source/text/sbasic/shared/03020101.xhp
@@ -34,44 +34,23 @@
</bookmark>
-<paragraph id="hd_id3157896" role="heading" level="1" xml-lang="en-US"><link href="text/sbasic/shared/03020101.xhp" name="Close Statement">Close Statement</link></paragraph>
+<h1 id="hd_id3157896"><variable id="Close_h1"><link href="text/sbasic/shared/03020101.xhp" name="Close Statement">Close Statement</link></variable></h1>
<paragraph id="par_id3147573" role="paragraph" xml-lang="en-US">Closes a specified file that was opened with the Open statement.</paragraph>
</section>
-<paragraph id="hd_id3156344" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+<paragraph role="paragraph" id="par_id971587473488701">
+ <image src="media/helpimg/sbasic/Close_statement.svg" id="img_id4156296484514"><alt xml-lang="en-US" id="alt_id15152796484514">Close Statement diagram</alt></image>
+</paragraph>
<bascode>
-<paragraph id="par_id3147265" role="bascode" xml-lang="en-US">Close FileNumber As Integer[, FileNumber2 As Integer[,...]] </paragraph>
+<paragraph id="par_id3147265" role="bascode" xml-lang="en-US">Close [[#]fileNum [, [#]fileNum2 [,...]]]</paragraph>
</bascode>
-<paragraph id="hd_id3153379" role="heading" level="2" xml-lang="en-US">Parameters:</paragraph>
-<paragraph id="par_id3150791" role="paragraph" xml-lang="en-US"> <emph>FileNumber:</emph> Any integer expression that specifies the number of the data channel that was opened with the <emph>Open</emph> statement.</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+<paragraph id="par_id3150791" role="paragraph" xml-lang="en-US"> <emph>fileNum:</emph> Any integer expression that specifies the number of the data channel that was opened with the <emph>Open</emph> statement.</paragraph>
-<paragraph id="hd_id3153192" role="heading" level="2" xml-lang="en-US">Example:</paragraph>
-<bascode>
-<paragraph id="par_idm1341290400" role="bascode" localize="false" xml-lang="en-US">Sub ExampleWorkWithAFile</paragraph>
-<paragraph id="par_idm1341289152" role="bascode" localize="false" xml-lang="en-US">Dim iNumber As Integer</paragraph>
-<paragraph id="par_idm1341287920" role="bascode" localize="false" xml-lang="en-US">Dim sLine As String</paragraph>
-<paragraph id="par_idm1341286688" role="bascode" localize="false" xml-lang="en-US">Dim aFile As String</paragraph>
-<paragraph id="par_idm1341285456" role="bascode" localize="false" xml-lang="en-US">Dim sMsg As String</paragraph>
-<paragraph id="par_idm1341284224" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph>
-<paragraph id="par_idm1341282976" role="bascode" localize="false" xml-lang="en-US"> sMsg = ""</paragraph>
-<paragraph id="par_idm1341281744" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph>
-<paragraph id="par_idm1341280512" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Output As #iNumber</paragraph>
-<paragraph id="par_id3153727" role="bascode" xml-lang="en-US"> Print #iNumber, "First line of text"</paragraph>
-<paragraph id="par_id3147350" role="bascode" xml-lang="en-US"> Print #iNumber, "Another line of text"</paragraph>
-<paragraph id="par_idm1340923792" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph>
-<paragraph id="par_idm1340922560" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph>
-<paragraph id="par_idm1340921328" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Input As iNumber</paragraph>
-<paragraph id="par_idm1340920080" role="bascode" localize="false" xml-lang="en-US"> While Not eof(iNumber)</paragraph>
-<paragraph id="par_idm1340918832" role="bascode" localize="false" xml-lang="en-US"> Line Input #iNumber, sLine</paragraph>
-<paragraph id="par_idm1340917584" role="bascode" localize="false" xml-lang="en-US"> If sLine &lt;&gt;"" Then</paragraph>
-<paragraph id="par_idm1340916336" role="bascode" localize="false" xml-lang="en-US"> sMsg = sMsg &amp; sLine &amp; chr(13)</paragraph>
-<paragraph id="par_idm1340915072" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph>
-<paragraph id="par_idm1340913840" role="bascode" localize="false" xml-lang="en-US"> Wend</paragraph>
-<paragraph id="par_idm1340912608" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph>
-<paragraph id="par_idm1340911376" role="bascode" localize="false" xml-lang="en-US"> MsgBox sMsg</paragraph>
-<paragraph id="par_idm1340910144" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph>
-</bascode>
-</body>
+<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+<embed href="text/sbasic/shared/03020103.xhp#FileExample"/>
+</body>
</helpdocument> \ No newline at end of file
diff --git a/source/text/sbasic/shared/03020103.xhp b/source/text/sbasic/shared/03020103.xhp
index 14daf49553..bb605bc896 100644
--- a/source/text/sbasic/shared/03020103.xhp
+++ b/source/text/sbasic/shared/03020103.xhp
@@ -33,49 +33,60 @@
<bookmark_value>Open statement</bookmark_value>
</bookmark>
-
-<h1 id="hd_id3150791"><link href="text/sbasic/shared/03020103.xhp" name="Open Statement">Open Statement</link></h1>
+<h1 id="hd_id3150791"><variable id="Open_h1"><link href="text/sbasic/shared/03020103.xhp" name="Open Statement">Open Statement</link></variable></h1>
<paragraph id="par_id3150769" role="paragraph" xml-lang="en-US">Opens a data channel.</paragraph>
</section>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+<paragraph role="paragraph" id="par_id971587473488701">
+ <image src="media/helpimg/sbasic/Open_statement.svg" id="img_id4156296484514"><alt xml-lang="en-US" id="alt_id15152796484514">Open Statement diagram</alt></image>
+</paragraph>
+<paragraph role="paragraph" id="par_id971587473488702">
+ <image src="media/helpimg/sbasic/access_fragment.svg" id="img_id4156296484515"><alt xml-lang="en-US" id="alt_id15152796484515">access fragment diagram</alt></image>
+</paragraph>
+<paragraph role="paragraph" id="par_id971587473488703">
+ <image src="media/helpimg/sbasic/locking_fragment.svg" id="img_id4156296484516"><alt xml-lang="en-US" id="alt_id15152796484516">locking fragment diagram</alt></image>
+</paragraph>
<bascode>
-<paragraph id="par_id3154124" localize="false" role="bascode" xml-lang="en-US">Open FileName As String [For Mode] [Access IOMode] [Protected] As [#]FileNumber As Integer [Len = DatasetLength]<comment>i37502</comment></paragraph>
+<paragraph id="par_id3154124" localize="false" role="bascode">Open pathname For mode [Access io] [locking] As [#]filenum [Len=recLen]</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
-<paragraph id="par_id3155132" role="paragraph" xml-lang="en-US"> <emph>FileName: </emph>Name and path of the file to open. If you try to read a file that does not exist (Access = Read), an error message appears. If you try to write to a file that does not exist (Access = Write), a new file is created.</paragraph>
-<paragraph id="par_id3149262" role="paragraph" xml-lang="en-US"> <emph>Mode:</emph> Keyword that specifies the file mode. Valid values: Append (append to sequential file), Binary (data can be accessed by bytes using Get and Put), Input (opens data channel for reading), Output (opens data channel for writing), and Random (edits relative files).</paragraph>
-<paragraph id="par_id3154014" role="paragraph" xml-lang="en-US"> <emph>IOMode:</emph> Keyword that defines the access type. Valid values: Read (read-only), Write (write-only), Read Write (both).</paragraph>
-<paragraph id="par_id3150011" role="paragraph" xml-lang="en-US"> <emph>Protected:</emph> Keyword that defines the security status of a file after opening. Valid values: Shared (file may be opened by other applications), Lock Read (file is protected against reading), Lock Write (file is protected against writing), Lock Read Write (denies file access).</paragraph>
-<paragraph id="par_id3153190" role="paragraph" xml-lang="en-US"> <emph>FileNumber:</emph> Any integer expression from 0 to 511 to indicate the number of a free data channel. You can then pass commands through the data channel to access the file. The file number must be determined by the FreeFile function immediately before the Open statement.</paragraph>
-<paragraph id="par_id3151115" role="paragraph" xml-lang="en-US"> <emph>DatasetLength:</emph> For random access files, set the length of the records.<comment>#61736</comment></paragraph>
+<paragraph id="par_id3155132" role="paragraph" xml-lang="en-US"> <emph>pathname: </emph>Path and name of the file to open. If you try to read a file that does not exist (Access = Read), an error message appears. If you try to write to a file that does not exist (Access = Write), a new file is created.</paragraph>
+<paragraph id="par_id3149262" role="paragraph" xml-lang="en-US"> <emph>mode:</emph> Keyword that specifies the file mode. Valid values: <literal>Append</literal> (append to sequential file), <literal>Binary</literal> (data can be accessed by bytes using Get and Put), <literal>Input</literal> (opens data channel for reading), <literal>Output</literal> (opens data channel for writing), and <literal>Random</literal> (edits relative files).</paragraph>
+<paragraph id="par_id3154014" role="paragraph" xml-lang="en-US"> <emph>io:</emph> Keyword that defines the access type. Valid values: <literal>Read</literal> (read-only), <literal>Write</literal> (write-only), <literal>Read Write</literal> (both).</paragraph>
+<paragraph id="par_id3150011" role="paragraph" xml-lang="en-US"> <emph>locking:</emph> Keyword that defines the security status of a file after opening. Valid values: <literal>Shared</literal> (file may be opened by other applications), <literal>Lock Read</literal> (file is protected against reading), <literal>Lock Write</literal> (file is protected against writing), <literal>Lock Read Write</literal> (denies file access).</paragraph>
+<paragraph id="par_id3153190" role="paragraph" xml-lang="en-US"> <emph>filenum:</emph> Any integer expression from 0 to 511 to indicate the number of a free data channel. You can then pass commands through the data channel to access the file. The file number must be determined by the FreeFile function immediately before the Open statement.</paragraph>
+ <paragraph id="par_id3151115" role="paragraph" xml-lang="en-US"> <emph>recLen:</emph> For <literal>Random</literal> access files, set the length of the records.<comment>#61736</comment></paragraph>
<note id="par_id3153418">You can only modify the contents of a file that was opened with the Open statement. If you try to open a file that is already open, an error message appears.</note>
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+<section id="FileExample">
<bascode>
-<paragraph id="par_idm1341597584" role="bascode" localize="false" xml-lang="en-US">Sub ExampleWorkWithAFile</paragraph>
-<paragraph id="par_idm1341596336" role="bascode" localize="false" xml-lang="en-US">Dim iNumber As Integer</paragraph>
-<paragraph id="par_idm1341595104" role="bascode" localize="false" xml-lang="en-US">Dim sLine As String</paragraph>
-<paragraph id="par_idm1341593872" role="bascode" localize="false" xml-lang="en-US">Dim aFile As String</paragraph>
-<paragraph id="par_idm1341592640" role="bascode" localize="false" xml-lang="en-US">Dim sMsg As String</paragraph>
-<paragraph id="par_idm1341591408" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph>
-<paragraph id="par_idm1341590160" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph>
-<paragraph id="par_idm1341588928" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Output As #iNumber</paragraph>
+<paragraph id="par_idm1341597584" role="bascode" localize="false">Sub ExampleWorkWithAFile</paragraph>
+<paragraph id="par_idm1341596336" role="bascode" localize="false">Dim iNumber As Integer</paragraph>
+<paragraph id="par_idm1341595104" role="bascode" localize="false">Dim sLine As String</paragraph>
+<paragraph id="par_idm1341593872" role="bascode" localize="false">Dim aFile As String</paragraph>
+<paragraph id="par_idm1341592640" role="bascode" localize="false">Dim sMsg As String</paragraph>
+<paragraph id="par_idm1341591408" role="bascode" localize="false"> aFile = "c:\data.txt"</paragraph>
+<paragraph id="par_idm1341590160" role="bascode" localize="false"> iNumber = Freefile</paragraph>
+<paragraph id="par_idm1341588928" role="bascode" localize="false"> Open aFile For Output As #iNumber</paragraph>
<paragraph id="par_id3154705" role="bascode" xml-lang="en-US"> Print #iNumber, "This is a line of text"</paragraph>
<paragraph id="par_id3146916" role="bascode" xml-lang="en-US"> Print #iNumber, "This is another line of text"</paragraph>
-<paragraph id="par_idm1341584144" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph>
-<paragraph id="par_idm1341582912" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph>
-<paragraph id="par_idm1341581680" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Input As iNumber</paragraph>
-<paragraph id="par_idm1341580432" role="bascode" localize="false" xml-lang="en-US"> While Not eof(iNumber)</paragraph>
-<paragraph id="par_idm1341579184" role="bascode" localize="false" xml-lang="en-US"> Line Input #iNumber, sLine</paragraph>
-<paragraph id="par_idm1341577936" role="bascode" localize="false" xml-lang="en-US"> If sLine &lt;&gt;"" Then</paragraph>
-<paragraph id="par_idm1341576688" role="bascode" localize="false" xml-lang="en-US"> sMsg = sMsg &amp; sLine &amp; chr(13)</paragraph>
-<paragraph id="par_idm1341575424" role="bascode" localize="false" xml-lang="en-US"> End If</paragraph>
-<paragraph id="par_idm1341574192" role="bascode" localize="false" xml-lang="en-US"> Wend</paragraph>
-<paragraph id="par_idm1341572960" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph>
-<paragraph id="par_idm1341571728" role="bascode" localize="false" xml-lang="en-US"> MsgBox sMsg</paragraph>
-<paragraph id="par_idm1341570496" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph>
+<paragraph id="par_idm1341584144" role="bascode" localize="false"> Close #iNumber</paragraph>
+<paragraph id="par_idm1341582912" role="bascode" localize="false"> iNumber = Freefile</paragraph>
+<paragraph id="par_idm1341581680" role="bascode" localize="false"> Open aFile For Input As iNumber</paragraph>
+<paragraph id="par_idm1341580432" role="bascode" localize="false"> While Not eof(iNumber)</paragraph>
+<paragraph id="par_idm1341579184" role="bascode" localize="false"> Line Input #iNumber, sLine</paragraph>
+<paragraph id="par_idm1341577936" role="bascode" localize="false"> If sLine &lt;&gt;"" Then</paragraph>
+<paragraph id="par_idm1341576688" role="bascode" localize="false"> sMsg = sMsg &amp; sLine &amp; chr(13)</paragraph>
+<paragraph id="par_idm1341575424" role="bascode" localize="false"> End If</paragraph>
+<paragraph id="par_idm1341574192" role="bascode" localize="false"> Wend</paragraph>
+<paragraph id="par_idm1341572960" role="bascode" localize="false"> Close #iNumber</paragraph>
+<paragraph id="par_idm1341571728" role="bascode" localize="false"> MsgBox sMsg</paragraph>
+<paragraph id="par_idm1341570496" role="bascode" localize="false">End Sub</paragraph>
</bascode>
+</section>
+
</body>
-</helpdocument>
+</helpdocument> \ No newline at end of file
diff --git a/source/text/sbasic/shared/03020201.xhp b/source/text/sbasic/shared/03020201.xhp
index eb46b84dd8..b2885659d2 100644
--- a/source/text/sbasic/shared/03020201.xhp
+++ b/source/text/sbasic/shared/03020201.xhp
@@ -27,58 +27,67 @@
<body>
-
<section id="get">
<bookmark xml-lang="en-US" branch="index" id="bm_id3154927">
<bookmark_value>Get statement</bookmark_value>
</bookmark>
-
-<paragraph id="hd_id3154927" role="heading" level="1" xml-lang="en-US"><link href="text/sbasic/shared/03020201.xhp">Get Statement</link></paragraph>
+<h1 id="hd_id3154927"><variable id="Get_h1"><link href="text/sbasic/shared/03020201.xhp">Get Statement</link></variable></h1>
<paragraph id="par_id3145069" role="paragraph" xml-lang="en-US">Reads a record from a relative file, or a sequence of bytes from a binary file, into a variable.</paragraph>
</section>
<paragraph id="par_id3154346" role="paragraph" xml-lang="en-US">See also: <link href="text/sbasic/shared/03020204.xhp" name="PUT"><item type="literal">PUT</item></link> Statement</paragraph>
-<paragraph id="hd_id3150358" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+<paragraph role="paragraph" id="par_id971587473488701">
+ <image src="media/helpimg/sbasic/Get_statement.svg" id="img_id4156296484514"><alt xml-lang="en-US" id="alt_id15152796484514">Get Statement diagram</alt></image>
+</paragraph>
<bascode>
-<paragraph id="par_id3150792" role="bascode" xml-lang="en-US">Get [#] FileNumber As Integer, [Position], Variable</paragraph>
+<paragraph id="par_id3150792" role="bascode" xml-lang="en-US">Get [#]fileNum, [recordNum|filePos], variable</paragraph>
</bascode>
-<paragraph id="hd_id3154138" role="heading" level="2" xml-lang="en-US">Parameters:</paragraph>
-<paragraph id="par_id3150448" role="paragraph" xml-lang="en-US"> <emph>FileNumber:</emph> Any integer expression that determines the file number.</paragraph>
-<paragraph id="par_id3154684" role="paragraph" xml-lang="en-US"> <emph>Position:</emph> For files opened in Random mode, <emph>Position</emph> is the number of the record that you want to read.</paragraph>
-<paragraph id="par_id3153768" role="paragraph" xml-lang="en-US">For files opened in Binary mode, <emph>Position</emph> is the byte position in the file where the reading starts.</paragraph>
-<paragraph id="par_id3147319" role="paragraph" xml-lang="en-US">If <emph>Position</emph> is omitted, the current position or the current data record of the file is used.</paragraph>
-<paragraph id="par_id3149484" role="paragraph" xml-lang="en-US">Variable: Name of the variable to be read. With the exception of object variables, you can use any variable type.</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+<paragraph id="par_id3150448" role="paragraph" xml-lang="en-US"> <emph>fileNum:</emph> Any integer expression that determines the file number.</paragraph>
+<paragraph id="par_id3154684" role="paragraph" xml-lang="en-US"> <emph>recordNum:</emph> For files opened in Random mode, <emph>recordNum</emph> is the number of the record that you want to read.</paragraph>
+<paragraph id="par_id3153768" role="paragraph" xml-lang="en-US">For files opened in Binary mode, <emph>filePos</emph> is the byte position in the file where the reading starts.</paragraph>
+<paragraph id="par_id3147319" role="paragraph" xml-lang="en-US">If <emph>recordNum</emph> and <emph>filePos</emph> are omitted, the current position or the current data record of the file is used.</paragraph>
+ <paragraph id="par_id3149484" role="paragraph" xml-lang="en-US"><emph>variable:</emph> Name of the variable to be read. With the exception of object variables, you can use any variable type.</paragraph>
-<paragraph id="hd_id3153144" role="heading" level="2" xml-lang="en-US">Example:</paragraph>
+<section id="ExampleRandomAccess">
+<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
-<paragraph id="par_idm1340774864" role="bascode" localize="false" xml-lang="en-US">Sub ExampleRandomAccess</paragraph>
-<paragraph id="par_idm1340773632" role="bascode" localize="false" xml-lang="en-US">Dim iNumber As Integer</paragraph>
-<paragraph id="par_id3155307" role="bascode" xml-lang="en-US">Dim sText As Variant ' Must be a variant</paragraph>
-<paragraph id="par_idm1340770608" role="bascode" localize="false" xml-lang="en-US">Dim aFile As String</paragraph>
-<paragraph id="par_idm1340769376" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph>
-<paragraph id="par_idm1340768128" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph>
-<paragraph id="par_idm1340766896" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Random As #iNumber Len=32</paragraph>
+<paragraph id="par_idm1340774864" role="bascode" localize="false">Sub ExampleRandomAccess</paragraph>
+<paragraph id="par_idm1340773632" role="bascode" localize="false"> Dim iNumber As Integer</paragraph>
+<paragraph id="par_id3155307" role="bascode" xml-lang="en-US"> Dim sText As Variant ' Must be a variant</paragraph>
+<paragraph id="par_idm1340770608" role="bascode" localize="false"> Dim aFile As String</paragraph>
+<paragraph id="par_idm1340769376" role="bascode" localize="false"> aFile = "c:\data.txt"</paragraph>
+<paragraph id="par_idm1340768128" role="bascode" localize="false"> iNumber = Freefile</paragraph>
+<paragraph id="par_idm1340766896" role="bascode" localize="false"> Open aFile For Random As #iNumber Len=32</paragraph>
<paragraph id="par_id3149411" role="bascode" xml-lang="en-US"> Seek #iNumber,1 ' Position at beginning</paragraph>
<paragraph id="par_id3153158" role="bascode" xml-lang="en-US"> Put #iNumber,, "This is the first line of text" ' Fill line with text</paragraph>
<paragraph id="par_id3148457" role="bascode" xml-lang="en-US"> Put #iNumber,, "This is the second line of text"</paragraph>
<paragraph id="par_id3150715" role="bascode" xml-lang="en-US"> Put #iNumber,, "This is the third line of text"</paragraph>
-<paragraph id="par_idm1340758576" role="bascode" localize="false" xml-lang="en-US"> Seek #iNumber,2</paragraph>
-<paragraph id="par_idm1340757344" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,,sText</paragraph>
-<paragraph id="par_idm1340756112" role="bascode" localize="false" xml-lang="en-US"> Print sText</paragraph>
-<paragraph id="par_idm1340754880" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph>
-<paragraph id="par_idm1340753648" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph>
-<paragraph id="par_idm1340752416" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Random As #iNumber Len=32</paragraph>
-<paragraph id="par_idm1340751152" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,2,sText</paragraph>
+<paragraph id="par_idm1340758576" role="bascode" localize="false"> Seek #iNumber,2</paragraph>
+<paragraph id="par_idm1340757344" role="bascode" localize="false"> Get #iNumber,,sText</paragraph>
+<paragraph id="par_idm1340756112" role="bascode" localize="false"> Print sText</paragraph>
+<paragraph id="par_idm1340754880" role="bascode" localize="false"> Close #iNumber</paragraph>
+<paragraph id="par_idm1340753648" role="bascode" localize="false"> iNumber = Freefile</paragraph>
+<paragraph id="par_idm1340752416" role="bascode" localize="false"> Open aFile For Random As #iNumber Len=32</paragraph>
+<paragraph id="par_idm1340751152" role="bascode" localize="false"> Get #iNumber,2,sText</paragraph>
<paragraph id="par_id3155938" role="bascode" xml-lang="en-US"> Put #iNumber,,"This is a new text"</paragraph>
-<paragraph id="par_idm1340748176" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,1,sText</paragraph>
-<paragraph id="par_idm1340746928" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,2,sText</paragraph>
+<paragraph id="par_idm1340748176" role="bascode" localize="false"> Get #iNumber,1,sText</paragraph>
+<paragraph id="par_idm1340746928" role="bascode" localize="false"> Get #iNumber,2,sText</paragraph>
<paragraph id="par_id3146916" role="bascode" xml-lang="en-US"> Put #iNumber,20,"This is the text in record 20"</paragraph>
-<paragraph id="par_idm1340743936" role="bascode" localize="false" xml-lang="en-US"> Print Lof(#iNumber)</paragraph>
-<paragraph id="par_idm1340742704" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph>
-<paragraph id="par_idm1340741472" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph>
+<paragraph id="par_idm1340743936" role="bascode" localize="false"> Print Lof(#iNumber)</paragraph>
+<paragraph id="par_idm1340742704" role="bascode" localize="false"> Close #iNumber</paragraph>
+<paragraph id="par_idm1340741472" role="bascode" localize="false">End Sub</paragraph>
</bascode>
-</body>
+</section>
+<section id="relatedtopics" >
+ <embed href="text/sbasic/shared/03020103.xhp#Open_h1"/>
+ <embed href="text/sbasic/shared/03020204.xhp#Put_h1"/>
+ <embed href="text/sbasic/shared/03020101.xhp#Close_h1"/>
+</section>
+
+</body>
</helpdocument> \ No newline at end of file
diff --git a/source/text/sbasic/shared/03020204.xhp b/source/text/sbasic/shared/03020204.xhp
index 79a276ecde..7549256374 100644
--- a/source/text/sbasic/shared/03020204.xhp
+++ b/source/text/sbasic/shared/03020204.xhp
@@ -26,60 +26,40 @@
</meta>
<body>
-
-
<section id="put">
<bookmark xml-lang="en-US" branch="index" id="bm_id3150360">
<bookmark_value>Put statement</bookmark_value>
</bookmark>
-
-<paragraph id="hd_id3150360" role="heading" level="1" xml-lang="en-US"><link href="text/sbasic/shared/03020204.xhp" name="Put Statement">Put Statement</link></paragraph>
+<h1 id="hd_id3150360"><variable id="Put_h1"><link href="text/sbasic/shared/03020204.xhp" name="Put Statement">Put Statement</link></variable></h1>
<paragraph id="par_id3154909" role="paragraph" xml-lang="en-US">Writes a record to a relative file or a sequence of bytes to a binary file.</paragraph>
</section>
<paragraph id="par_id3156281" role="paragraph" xml-lang="en-US">See also: <link href="text/sbasic/shared/03020201.xhp" name="Get"><item type="literal">Get</item></link> statement</paragraph>
-<paragraph id="hd_id3125863" role="heading" level="2" xml-lang="en-US">Syntax:</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+<paragraph role="paragraph" id="par_id971587473488701">
+ <image src="media/helpimg/sbasic/Put_statement.svg" id="img_id4156296484514"><alt xml-lang="en-US" id="alt_id15152796484514">Put Statement diagram</alt></image>
+</paragraph>
<bascode>
-<paragraph id="par_id3155132" role="bascode" xml-lang="en-US">Put [#] FileNumber As Integer, [position], Variable</paragraph>
+<paragraph id="par_id3155132" role="bascode" xml-lang="en-US">Put [#]fileNum, [recordNum|filePos], variable</paragraph>
</bascode>
-<paragraph id="hd_id3153190" role="heading" level="2" xml-lang="en-US">Parameters:</paragraph>
-<paragraph id="par_id3146120" role="paragraph" xml-lang="en-US"> <emph>FileNumber:</emph> Any integer expression that defines the file that you want to write to.</paragraph>
-<paragraph id="par_id3155411" role="paragraph" xml-lang="en-US"> <emph>Position: </emph>For relative files (random access files), the number of the record that you want to write.</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+<paragraph id="par_id3146120" role="paragraph" xml-lang="en-US"> <emph>fileNum:</emph> Any integer expression that defines the file that you want to write to.</paragraph>
+<paragraph id="par_id3155411" role="paragraph" xml-lang="en-US"> <emph>recordNum, filePos: </emph>For relative files (random access files), the number of the record that you want to write.</paragraph>
<paragraph id="par_id3148576" role="paragraph" xml-lang="en-US">For binary files (binary access), the position of the byte in the file where you want to start writing.</paragraph>
-<paragraph id="par_id3153729" role="paragraph" xml-lang="en-US"> <emph>Variable:</emph> Name of the variable that you want to write to the file.</paragraph>
+<paragraph id="par_id3153729" role="paragraph" xml-lang="en-US"> <emph>variable:</emph> Name of the variable that you want to write to the file.</paragraph>
<paragraph id="par_id3146974" role="paragraph" xml-lang="en-US">Note for relative files: If the contents of this variable does not match the length of the record that is specified in the <emph>Len</emph> clause of the <emph>Open</emph> statement, the space between the end of the newly written record and the next record is padded with existing data from the file that you are writing to.</paragraph>
<paragraph id="par_id3155855" role="paragraph" xml-lang="en-US">Note for binary files: The contents of the variables are written to the specified position, and the file pointer is inserted directly after the last byte. No space is left between the records.</paragraph>
-<paragraph id="hd_id3154491" role="heading" level="2" xml-lang="en-US">Example:</paragraph>
-<bascode>
-<paragraph id="par_idm1341567184" role="bascode" localize="false" xml-lang="en-US">Sub ExampleRandomAccess</paragraph>
-<paragraph id="par_idm1341565952" role="bascode" localize="false" xml-lang="en-US">Dim iNumber As Integer</paragraph>
-<paragraph id="par_id3154729" role="bascode" xml-lang="en-US">Dim sText As Variant ' Must be a variant type</paragraph>
-<paragraph id="par_idm1341562976" role="bascode" localize="false" xml-lang="en-US">Dim aFile As String</paragraph>
-<paragraph id="par_idm1341561744" role="bascode" localize="false" xml-lang="en-US"> aFile = "c:\data.txt"</paragraph>
-<paragraph id="par_idm1341560496" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph>
-<paragraph id="par_idm1341559264" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Random As #iNumber Len=32</paragraph>
-<paragraph id="par_id3156278" role="bascode" xml-lang="en-US"> Seek #iNumber,1 ' Position To start writing</paragraph>
-<paragraph id="par_id3153711" role="bascode" xml-lang="en-US"> Put #iNumber,, "This is the first line of text" ' Fill line with text</paragraph>
-<paragraph id="par_id3155446" role="bascode" xml-lang="en-US"> Put #iNumber,, "This is the second line of text"</paragraph>
-<paragraph id="par_id3154255" role="bascode" xml-lang="en-US"> Put #iNumber,, "This is the third line of text"</paragraph>
-<paragraph id="par_idm1341550944" role="bascode" localize="false" xml-lang="en-US"> Seek #iNumber,2</paragraph>
-<paragraph id="par_idm1341549712" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,,sText</paragraph>
-<paragraph id="par_idm1341548480" role="bascode" localize="false" xml-lang="en-US"> Print sText</paragraph>
-<paragraph id="par_idm1341547248" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph>
-<paragraph id="par_idm1341546016" role="bascode" localize="false" xml-lang="en-US"> iNumber = Freefile</paragraph>
-<paragraph id="par_idm1341544784" role="bascode" localize="false" xml-lang="en-US"> Open aFile For Random As #iNumber Len=32</paragraph>
-<paragraph id="par_idm1341543520" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,2,sText</paragraph>
-<paragraph id="par_id3150940" role="bascode" xml-lang="en-US"> Put #iNumber,,"This is new text"</paragraph>
-<paragraph id="par_idm1341540544" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,1,sText</paragraph>
-<paragraph id="par_idm1341539296" role="bascode" localize="false" xml-lang="en-US"> Get #iNumber,2,sText</paragraph>
-<paragraph id="par_id3159102" role="bascode" xml-lang="en-US"> Put #iNumber,20,"This is the text in record 20"</paragraph>
-<paragraph id="par_idm1341536304" role="bascode" localize="false" xml-lang="en-US"> Print Lof(#iNumber)</paragraph>
-<paragraph id="par_idm1341535072" role="bascode" localize="false" xml-lang="en-US"> Close #iNumber</paragraph>
-<paragraph id="par_idm1341533840" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph>
-</bascode>
-</body>
+<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+<embed href="text/sbasic/shared/03020201.xhp#ExampleRandomAccess"/>
+
+<section id="relatedtopics" >
+ <embed href="text/sbasic/shared/03020101.xhp#Close_h1"/>
+ <embed href="text/sbasic/shared/03020201.xhp#Get_h1"/>
+ <embed href="text/sbasic/shared/03020103.xhp#Open_h1"/>
+</section>
+</body>
</helpdocument> \ No newline at end of file