03020103.xhp (06cf5254) 03020103.xhp (c5ffc49b)
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

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

25<meta>
26<topic id="textsbasicshared03020103xml" indexer="include" status="PUBLISH">
27<title id="tit" xml-lang="en-US">Open Statement [Runtime]</title>
28<filename>/text/sbasic/shared/03020103.xhp</filename>
29</topic>
30</meta>
31<body>
32<section id="open">
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

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

25<meta>
26<topic id="textsbasicshared03020103xml" indexer="include" status="PUBLISH">
27<title id="tit" xml-lang="en-US">Open Statement [Runtime]</title>
28<filename>/text/sbasic/shared/03020103.xhp</filename>
29</topic>
30</meta>
31<body>
32<section id="open">
33<bookmark xml-lang="en-US" branch="index" id="bm_id3150791"><bookmark_value>Open statement</bookmark_value>
33<bookmark xml-lang="en-US" branch="index" id="bm_id3150791">
34<bookmark_value>Open statement</bookmark_value>
34</bookmark>
35<paragraph role="heading" id="hd_id3150791" xml-lang="en-US" level="1" l10n="U" oldref="1"><link href="text/sbasic/shared/03020103.xhp" name="Open Statement [Runtime]">Open Statement [Runtime]</link></paragraph>
36<paragraph role="paragraph" id="par_id3150769" xml-lang="en-US" l10n="U" oldref="2">Opens a data channel.</paragraph>
37</section>
38<paragraph role="heading" id="hd_id3147230" xml-lang="en-US" level="2" l10n="U" oldref="3">Syntax:</paragraph>
39<paragraph role="code" id="par_id3154124" xml-lang="en-US" l10n="CHG" oldref="4">Open FileName As String [For Mode] [Access IOMode] [Protected] As [#]FileNumber As Integer [Len = DatasetLength]<comment>UFI: #i37502#</comment></paragraph>
40<paragraph role="heading" id="hd_id3156280" xml-lang="en-US" level="2" l10n="U" oldref="5">Parameters:</paragraph>
41<paragraph role="paragraph" id="par_id3155132" xml-lang="en-US" l10n="U" oldref="6">
35</bookmark>
36<paragraph role="heading" id="hd_id3150791" xml-lang="en-US" level="1" l10n="U" oldref="1"><link href="text/sbasic/shared/03020103.xhp" name="Open Statement [Runtime]">Open Statement [Runtime]</link></paragraph>
37<paragraph role="paragraph" id="par_id3150769" xml-lang="en-US" l10n="U" oldref="2">Opens a data channel.</paragraph>
38</section>
39<paragraph role="heading" id="hd_id3147230" xml-lang="en-US" level="2" l10n="U" oldref="3">Syntax:</paragraph>
40<paragraph role="code" id="par_id3154124" xml-lang="en-US" l10n="CHG" oldref="4">Open FileName As String [For Mode] [Access IOMode] [Protected] As [#]FileNumber As Integer [Len = DatasetLength]<comment>UFI: #i37502#</comment></paragraph>
41<paragraph role="heading" id="hd_id3156280" xml-lang="en-US" level="2" l10n="U" oldref="5">Parameters:</paragraph>
42<paragraph role="paragraph" id="par_id3155132" xml-lang="en-US" l10n="U" oldref="6">
42<emph>FileName: </emph>Name and path of the file that you wan 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>
43<emph>FileName:</emph> Name and path of the file that you wan 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>
43<paragraph role="paragraph" id="par_id3149262" xml-lang="en-US" l10n="U" oldref="7">
44<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>
45<paragraph role="paragraph" id="par_id3154014" xml-lang="en-US" l10n="CHG" oldref="8">
46<emph>IOMode:</emph> Keyword that defines the access type. Valid values: Read (read-only), Write (write-only), Read Write (both).</paragraph>
47<paragraph role="paragraph" id="par_id3150011" xml-lang="en-US" l10n="U" oldref="9">
48<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>
49<paragraph role="paragraph" id="par_id3153190" xml-lang="en-US" l10n="U" oldref="10">
50<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>

--- 28 unchanged lines hidden ---
44<paragraph role="paragraph" id="par_id3149262" xml-lang="en-US" l10n="U" oldref="7">
45<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>
46<paragraph role="paragraph" id="par_id3154014" xml-lang="en-US" l10n="CHG" oldref="8">
47<emph>IOMode:</emph> Keyword that defines the access type. Valid values: Read (read-only), Write (write-only), Read Write (both).</paragraph>
48<paragraph role="paragraph" id="par_id3150011" xml-lang="en-US" l10n="U" oldref="9">
49<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>
50<paragraph role="paragraph" id="par_id3153190" xml-lang="en-US" l10n="U" oldref="10">
51<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>

--- 28 unchanged lines hidden ---