03020204.xhp (c5ffc49b) 03020204.xhp (23444184)
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--***********************************************************
4 *
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements. See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership. The ASF licenses this file

--- 29 unchanged lines hidden (view full) ---

38</section>
39<paragraph role="paragraph" id="par_id3156281" xml-lang="en-US" l10n="U" oldref="3">See also: <link href="text/sbasic/shared/03020201.xhp" name="Get"><item type="literal">Get</item></link> statement</paragraph>
40<paragraph role="heading" id="hd_id3125863" xml-lang="en-US" level="2" l10n="U" oldref="4">Syntax:</paragraph>
41<paragraph role="code" id="par_id3155132" xml-lang="en-US" l10n="U" oldref="5">Put [#] FileNumber As Integer, [position], Variable</paragraph>
42<paragraph role="heading" id="hd_id3153190" xml-lang="en-US" level="2" l10n="U" oldref="6">Parameters:</paragraph>
43<paragraph role="paragraph" id="par_id3146120" xml-lang="en-US" l10n="U" oldref="7">
44<emph>FileNumber:</emph> Any integer expression that defines the file that you want to write to.</paragraph>
45<paragraph role="paragraph" id="par_id3155411" xml-lang="en-US" l10n="U" oldref="8">
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--***********************************************************
4 *
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements. See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership. The ASF licenses this file

--- 29 unchanged lines hidden (view full) ---

38</section>
39<paragraph role="paragraph" id="par_id3156281" xml-lang="en-US" l10n="U" oldref="3">See also: <link href="text/sbasic/shared/03020201.xhp" name="Get"><item type="literal">Get</item></link> statement</paragraph>
40<paragraph role="heading" id="hd_id3125863" xml-lang="en-US" level="2" l10n="U" oldref="4">Syntax:</paragraph>
41<paragraph role="code" id="par_id3155132" xml-lang="en-US" l10n="U" oldref="5">Put [#] FileNumber As Integer, [position], Variable</paragraph>
42<paragraph role="heading" id="hd_id3153190" xml-lang="en-US" level="2" l10n="U" oldref="6">Parameters:</paragraph>
43<paragraph role="paragraph" id="par_id3146120" xml-lang="en-US" l10n="U" oldref="7">
44<emph>FileNumber:</emph> Any integer expression that defines the file that you want to write to.</paragraph>
45<paragraph role="paragraph" id="par_id3155411" xml-lang="en-US" l10n="U" oldref="8">
46<emph>Position: </emph>For relative files (random access files), the number of the record that you want to write.</paragraph>
46<emph>Position:</emph> For relative files (random access files), the number of the record that you want to write.</paragraph>
47<paragraph role="paragraph" id="par_id3148576" xml-lang="en-US" l10n="U" oldref="9">For binary files (binary access), the position of the byte in the file where you want to start writing.</paragraph>
48<paragraph role="paragraph" id="par_id3153729" xml-lang="en-US" l10n="U" oldref="10">
49<emph>Variable:</emph> Name of the variable that you want to write to the file.</paragraph>
50<paragraph role="paragraph" id="par_id3146974" xml-lang="en-US" l10n="U" oldref="11">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>
51<paragraph role="paragraph" id="par_id3155855" xml-lang="en-US" l10n="U" oldref="12">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>
52<paragraph role="heading" id="hd_id3154491" xml-lang="en-US" level="2" l10n="U" oldref="13">Example:</paragraph>
53<paragraph role="code" id="par_id3149410" xml-lang="en-US" l10n="U" oldref="14">Sub ExampleRandomAccess</paragraph>
54<paragraph role="code" id="par_id3149959" xml-lang="en-US" l10n="U" oldref="15">Dim iNumber As Integer</paragraph>

--- 25 unchanged lines hidden ---
47<paragraph role="paragraph" id="par_id3148576" xml-lang="en-US" l10n="U" oldref="9">For binary files (binary access), the position of the byte in the file where you want to start writing.</paragraph>
48<paragraph role="paragraph" id="par_id3153729" xml-lang="en-US" l10n="U" oldref="10">
49<emph>Variable:</emph> Name of the variable that you want to write to the file.</paragraph>
50<paragraph role="paragraph" id="par_id3146974" xml-lang="en-US" l10n="U" oldref="11">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>
51<paragraph role="paragraph" id="par_id3155855" xml-lang="en-US" l10n="U" oldref="12">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>
52<paragraph role="heading" id="hd_id3154491" xml-lang="en-US" level="2" l10n="U" oldref="13">Example:</paragraph>
53<paragraph role="code" id="par_id3149410" xml-lang="en-US" l10n="U" oldref="14">Sub ExampleRandomAccess</paragraph>
54<paragraph role="code" id="par_id3149959" xml-lang="en-US" l10n="U" oldref="15">Dim iNumber As Integer</paragraph>

--- 25 unchanged lines hidden ---