14
14
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="mclose">
16
<refname>mclose</refname>
17
<refpurpose>closes an opened file</refpurpose>
20
<title>Calling Sequence</title>
27
<title>Arguments</title>
33
a scalar: the <varname>fd</varname> parameter returned by the function <function>mopen</function> is used as a file descriptor.
40
<para>a scalar: an error indicator.</para>
46
<title>Description</title>
48
<function>mclose</function> must be used to close a file opened by
49
<function>mopen</function>. If <varname>fd</varname> is omitted
50
<function>mclose</function> closes the last opend file.
53
<code>mclose('all')</code> closes all files opened by
54
<code>file('open',..)</code> or <function>mopen</function>.
56
Be careful with this use of <function>mclose</function> because when
57
it is used inside a Scilab script file, it also closes the script and
58
Scilab will not execute commands written after
59
<code>mclose('all')</code>.
63
<refsection role="see also">
64
<title>See Also</title>
65
<simplelist type="inline">
67
<link linkend="meof">meof</link>
70
<link linkend="mfprintf">mfprintf</link>
73
<link linkend="fprintfMat">fprintfMat</link>
76
<link linkend="mfscanf">mfscanf</link>
79
<link linkend="fscanfMat">fscanfMat</link>
82
<link linkend="mget">mget</link>
85
<link linkend="mgetl">mgetl</link>
88
<link linkend="mgetstr">mgetstr</link>
91
<link linkend="mopen">mopen</link>
94
<link linkend="mprintf">mprintf</link>
97
<link linkend="mput">mput</link>
100
<link linkend="mputl">mputl</link>
103
<link linkend="mputstr">mputstr</link>
106
<link linkend="mseek">mseek</link>
109
<link linkend="mtell">mtell</link>
112
<link linkend="file">file</link>
115
<link linkend="mdelete">mdelete</link>
16
<refname>mclose</refname>
17
<refpurpose>closes an opened file</refpurpose>
20
<title>Calling Sequence</title>
27
<title>Arguments</title>
33
a scalar: the <varname>fd</varname> parameter returned by the function <function>mopen</function> is used as a file descriptor.
40
<para>a scalar: an error indicator.</para>
46
<title>Description</title>
48
<function>mclose</function> must be used to close a file opened by
49
<function>mopen</function>. If <varname>fd</varname> is omitted
50
<function>mclose</function> closes the last opend file.
53
<code>mclose('all')</code> closes all files opened by
54
<code>file('open',..)</code> or <function>mopen</function>.
56
Be careful with this use of <function>mclose</function> because when
57
it is used inside a Scilab script file, it also closes the script and
58
Scilab will not execute commands written after
59
<code>mclose('all')</code>.
63
<refsection role="see also">
64
<title>See Also</title>
65
<simplelist type="inline">
67
<link linkend="meof">meof</link>
70
<link linkend="mfprintf">mfprintf</link>
73
<link linkend="fprintfMat">fprintfMat</link>
76
<link linkend="mfscanf">mfscanf</link>
79
<link linkend="fscanfMat">fscanfMat</link>
82
<link linkend="mget">mget</link>
85
<link linkend="mgetl">mgetl</link>
88
<link linkend="mgetstr">mgetstr</link>
91
<link linkend="mopen">mopen</link>
94
<link linkend="mprintf">mprintf</link>
97
<link linkend="mput">mput</link>
100
<link linkend="mputl">mputl</link>
103
<link linkend="mputstr">mputstr</link>
106
<link linkend="mseek">mseek</link>
109
<link linkend="mtell">mtell</link>
112
<link linkend="file">file</link>
115
<link linkend="mdelete">mdelete</link>