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="pause">
4 <refname>pause</refname>
5 <refpurpose>pause mode, invoke keyboard</refpurpose>
8 <title>Description</title>
10 Switch to the <code>pause</code> mode;
11 inserted in the code of a function, <code>pause</code> interrupts the execution
12 of the function: one receives a prompt symbol which indicates
13 the level of the <code>pause</code> (e.g. <literal>-1-></literal>). The user is
14 then in a new workspace in which all the lower-level variables
15 (and in particular all the variable of the function) are available.
16 To return to the calling workspace enter <code>return</code>.
19 In this mode, <literal>[...]=return(...) </literal>
20 returns the variables of the argument <literal>(...)</literal> to the calling workspace with
21 names in the output <literal>[...]</literal>. Otherwise, the lower-level variables
22 are protected and cannot be modified.
25 The <literal>pause</literal> is extremely useful for debugging purposes.
28 This mode is killed by the command <code>abort</code>.
32 <title>Examples</title>
33 <programlisting role="example"><![CDATA[
36 disp("Thanks to the pause, you can investigate if ''a'' has the right value");
37 disp("Value can be changed too if needed.");
45 <refsection role="see also">
46 <title>See Also</title>
47 <simplelist type="inline">
49 <link linkend="halt">halt</link>
52 <link linkend="return">return</link>
55 <link linkend="abort">abort</link>
58 <link linkend="quit">quit</link>
61 <link linkend="whereami">whereami</link>
64 <link linkend="where">where</link>
67 <link linkend="sleep">sleep</link>