File: mode.xml

package info (click to toggle)
scilab 5.2.2-9
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 334,832 kB
  • ctags: 52,586
  • sloc: xml: 526,945; ansic: 223,590; fortran: 163,080; java: 56,934; cpp: 33,840; tcl: 27,936; sh: 20,397; makefile: 9,908; ml: 9,451; perl: 1,323; cs: 614; lisp: 30
file content (152 lines) | stat: -rw-r--r-- 4,271 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2009 - DIGITEO - Allan CORNET
 * 
 * This file must be used under the terms of the CeCILL.
 * This source file is licensed as described in the file COPYING, which
 * you should have received as part of this distribution.  The terms
 * are also available at    
 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 *
 -->
<refentry version="5.0-subset Scilab" xml:id="mode" xml:lang="en"
          xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg"
          xmlns:ns4="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:db="http://docbook.org/ns/docbook">
  <info>
    <pubdate>$LastChangedDate$</pubdate>
  </info>

  <refnamediv>
    <refname>mode</refname>

    <refpurpose>select a mode in exec file</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <title>Calling Sequence</title>

    <synopsis>mode(k)
k = mode()</synopsis>
  </refsynopsisdiv>

  <refsection>
    <title>Description</title>

    <para>Used <emphasis role="bold">exclusively</emphasis> inside an
    exec-file or a scilab function <literal>mode(k)</literal> allows to change
    the information displayed during the execution, depending on the value of
    <literal>k</literal>:</para>

    <variablelist>
      <varlistentry>
        <term>k = 0</term>

        <listitem>
          <para>The new variable values are displayed if required (see help on
          semicolon or comma).</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>k = -1</term>

        <listitem>
          <para>the exec file or scilab function executes silently. (this is
          the default value for scilab functions)</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>k = 2</term>

        <listitem>
          <para>default value on scilab prompt.</para>

          <para>Please notices that mode does not used at prompt, only in an
          exec-file or a scilab function.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>k = 1 or k = 3</term>

        <listitem>
          <para>each line of instructions is echoed preceded of the prompt(if
          possible). The new variable values are displayed if required. This
          is the default for exec files.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>k = 4 or k = 7</term>

        <listitem>
          <para>The new variable values are displayed if required, each line
          of instructions is echoed (if possible) and a prompt (&gt;&gt;) is
          issued after each line waiting for a carriage return .</para>

          <para>If carriage return follows character "p" the execution is
          paused (see <link linkend="pause">pause</link>).</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>k &gt; 7</term>

        <listitem>
          <para>user mode. if you define your own mode, it is recommended to
          use a value &gt; 100.</para>
        </listitem>
      </varlistentry>
    </variablelist>

    <para>Line display is disabled for compiled scilab function (see comp). By default, Scilab functions are executed using the silent ("-1")
    mode.</para>

    <para>functions in a function library are executed using "-1" mode.</para>
  </refsection>

  <refsection>
    <title>Examples</title>

    <programlisting role="example"><![CDATA[ 
// copy - paste in scilab

function example_mode( level_mode )
 mode(level_mode)
 a = 3
 disp(mode());
endfunction

mode(2)

example_mode(0)
example_mode(-1)
example_mode(2)
example_mode(1)
example_mode(3)
example_mode(7)

mode(2)
 ]]></programlisting>
  </refsection>

  <refsection>
    <title>See Also</title>

    <simplelist type="inline">
      <member><link linkend="exec">exec</link></member>

      <member><link linkend="execstr">execstr</link></member>

      <member><link linkend="semicolon">semicolon</link></member>

      <member><link linkend="comma">comma</link></member>
    </simplelist>
  </refsection>
</refentry>