write function fixed
[scilab.git] / scilab / modules / core / help / en_US / configuration / gstacksize.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <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" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="gstacksize">
3     <refnamediv>
4         <refname>gstacksize</refname>
5         <refpurpose>set/get scilab global stack size</refpurpose>
6     </refnamediv>
7     <refsynopsisdiv>
8         <title>Calling Sequence</title>
9         <synopsis>gstacksize(n)
10             gstacksize('max')
11             gstacksize('min')
12             sz=gstacksize()
13         </synopsis>
14     </refsynopsisdiv>
15     <refsection>
16         <title>Arguments</title>
17         <variablelist>
18             <varlistentry>
19                 <term>n</term>
20                 <listitem>
21                     <para>integer, the required global stack size given in number of double precision words</para>
22                 </listitem>
23             </varlistentry>
24             <varlistentry>
25                 <term>sz</term>
26                 <listitem>
27                     <para>2-vector [total used]</para>
28                 </listitem>
29             </varlistentry>
30         </variablelist>
31     </refsection>
32     <refsection>
33         <title>Description</title>
34         <para>
35             Scilab stores global variables in a stack.
36         </para>
37         <para>
38             <code>gstacksize(n)</code> allows the user to increase or decrease the size of
39             this stack. The maximum allowed size depends on the amount of
40             free memory and swap space available at the time.
41         </para>
42         <para>
43             <note>
44                 Note that Scilab can increase automatically the global stacksize when needed.
45             </note>
46         </para>
47         <para>
48             <code>sz=gstacksize()</code> returns a 2-vector which contains  the current
49             total and used global stack size.
50         </para>
51         <para>
52             <code>gstacksize('max')</code> allows the user to increase the size of
53             this global stack to the maximum.
54         </para>
55         <para>
56             <code>gstacksize('min')</code> allows the user to decrease the size of
57             this global stack to the minimum.
58         </para>
59     </refsection>
60     <refsection>
61         <title>Examples</title>
62         <programlisting role="example"><![CDATA[ 
63 currentStackSize = gstacksize();
64 disp("Maximum stacksize: " + string(currentStackSize(1)))
65 disp("Current usage: "+ string(currentStackSize(2)))
66
67  ]]></programlisting>
68     </refsection>
69     
70     <refsection role="see also">
71         <title>See Also</title>
72         <simplelist type="inline">
73             <member>
74                 <link linkend="who">who</link>
75             </member>
76             <member>
77                 <link linkend="stacksize">stacksize</link>
78             </member>
79         </simplelist>
80     </refsection>
81 </refentry>