This file is indexed.

/usr/share/doc/mathgl/mathgl_en/mathgl_en_67.html is in mathgl-doc-en 2.1.3.1-4ubuntu3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- This manual is for MathGL (version 2.1.2), a collection of classes and routines for scientific plotting. Please report any errors in this manual to mathgl.abalakin@gmail.org.

Copyright C 2008-2012 Alexey A. Balakin.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts.  A copy of the license is included in the section entitled "GNU
Free Documentation License."


 -->
<!-- Created on December 22, 2013 by texi2html 1.82
texi2html was written by: 
            Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people.
Send bugs and suggestions to <texi2html-bug@nongnu.org>
-->
<head>
<title>MathGL 2.1.2: 7.2 Program flow commands</title>

<meta name="description" content="MathGL 2.1.2: 7.2 Program flow commands">
<meta name="keywords" content="MathGL 2.1.2: 7.2 Program flow commands">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.82">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.roman {font-family:serif; font-weight:normal;}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="Program-flow-commands"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="mathgl_en_66.html#MGL-definition" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_68.html#mglParse-class" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en_65.html#MGL-scripts" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_65.html#MGL-scripts" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_69.html#UDAV" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_88.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Program-flow-commands-1"></a>
<h2 class="section">7.2 Program flow commands</h2>

<p>Below I show commands to control program flow, like, conditions, loops, define script arguments and so on. Other commands can be found in chapters <a href="mathgl_en_29.html#MathGL-core">MathGL core</a> and <a href="mathgl_en_51.html#Data-processing">Data processing</a>. Note, that some of program flow commands (like <a href="#define">define</a>, <a href="#ask">ask</a>, <a href="#call">call</a>, <a href="#for">for</a>, <a href="#func">func</a>) should be placed alone in the string.
</p>
<a name="index-chdir"></a>
<p><a name="chdir"></a>
</p><dl>
<dt><a name="index-chdir-1"></a><u>MGL command:</u> <b>chdir</b><i> 'path'</i></dt>
<dd><p>Changes the current directory to <var>path</var>.
</p></dd></dl>

<a name="index-ask"></a>
<p><a name="ask"></a>
</p><dl>
<dt><a name="index-ask-1"></a><u>MGL command:</u> <b>ask</b><i> $N 'question'</i></dt>
<dd><p>Sets <var>N</var>-th script argument to answer which give the user on the <var>question</var>. Usually this show dialog with question where user can enter some text as answer. Here <var>N</var> is digit (0...9) or alpha (a...z).
</p></dd></dl>

<a name="index-define"></a>
<p><a name="define"></a>
</p><dl>
<dt><a name="index-define-1"></a><u>MGL command:</u> <b>define</b><i> $N smth</i></dt>
<dd><p>Sets <var>N</var>-th script argument to <var>smth</var>. Note, that <var>smth</var> is used as is (with &lsquo;<samp>'</samp>&rsquo; symbols if present). Here <var>N</var> is digit (0...9) or alpha (a...z).
</p></dd></dl>
<dl>
<dt><a name="index-define-2"></a><u>MGL command:</u> <b>define</b><i> name smth</i></dt>
<dd><p>Create scalar variable <code>name</code> which have the numeric value of <code>smth</code>. Later you can use this variable as usual number. Here <var>N</var> is digit (0...9) or alpha (a...z).
</p></dd></dl>
<a name="index-defchr"></a>
<p><a name="defchr"></a>
</p><dl>
<dt><a name="index-defchr-1"></a><u>MGL command:</u> <b>defchr</b><i> $N smth</i></dt>
<dd><p>Sets <var>N</var>-th script argument to character with value evaluated from <var>smth</var>. Here <var>N</var> is digit (0...9) or alpha (a...z).
</p></dd></dl>
<a name="index-defnum"></a>
<p><a name="defnum"></a>
</p><dl>
<dt><a name="index-defnum-1"></a><u>MGL command:</u> <b>defnum</b><i> $N smth</i></dt>
<dd><p>Sets <var>N</var>-th script argument to number with value evaluated from <var>smth</var>. Here <var>N</var> is digit (0...9) or alpha (a...z).
</p></dd></dl>
<a name="index-defpal"></a>
<p><a name="defpal"></a>
</p><dl>
<dt><a name="index-defpal-1"></a><u>MGL command:</u> <b>defpal</b><i> $N smth</i></dt>
<dd><p>Sets <var>N</var>-th script argument to palette character at position evaluated from <var>smth</var>. Here <var>N</var> is digit (0...9) or alpha (a...z).
</p></dd></dl>

<a name="index-call"></a>
<p><a name="call"></a>
</p><dl>
<dt><a name="index-call-1"></a><u>MGL command:</u> <b>call</b><i> 'fname' [ARG1 ARG2 ... ARG9]</i></dt>
<dd><p>Executes function <var>fname</var> (or script if function is not found). Optional arguments will be passed to functions. See also <a href="#func">func</a>.
</p></dd></dl>
<a name="index-func"></a>
<p><a name="func"></a>
</p><dl>
<dt><a name="index-func-1"></a><u>MGL command:</u> <b>func</b><i> 'fname' [narg=0]</i></dt>
<dd><p>Define the function <var>fname</var> and number of required arguments. The arguments will be placed in script parameters $1, $2, ... $9. Note, you should stop script execution before function definition(s) by command <a href="#stop">stop</a>. See also <a href="#return">return</a>.
</p></dd></dl>
<a name="index-return"></a>
<p><a name="return"></a>
</p><dl>
<dt><a name="index-return-1"></a><u>MGL command:</u> <b>return</b></dt>
<dd><p>Return from the function. See also <a href="#func">func</a>.
</p></dd></dl>


<a name="index-if"></a>
<p><a name="if"></a>
</p><dl>
<dt><a name="index-if-1"></a><u>MGL command:</u> <b>if</b><i> dat 'cond'</i></dt>
<dd><p>Starts block which will be executed if <var>dat</var> satisfy to <var>cond</var>.
</p></dd></dl>
<dl>
<dt><a name="index-if-2"></a><u>MGL command:</u> <b>if</b><i> <code>val</code></i></dt>
<dd><p>Starts block which will be executed if <code>val</code> is nonzero.
</p></dd></dl>
<a name="index-elseif"></a>
<p><a name="elseif"></a>
</p><dl>
<dt><a name="index-elseif-1"></a><u>MGL command:</u> <b>elseif</b><i> dat 'cond'</i></dt>
<dd><p>Starts block which will be executed if previous <code>if</code> or <code>elseif</code> is false and <var>dat</var> satisfy to <var>cond</var>.
</p></dd></dl>
<dl>
<dt><a name="index-elseif-2"></a><u>MGL command:</u> <b>elseif</b><i> <code>val</code></i></dt>
<dd><p>Starts block which will be executed if previous <code>if</code> or <code>elseif</code> is false and <code>val</code> is nonzero.
</p></dd></dl>
<a name="index-else"></a>
<p><a name="else"></a>
</p><dl>
<dt><a name="index-else-1"></a><u>MGL command:</u> <b>else</b></dt>
<dd><p>Starts block which will be executed if previous <code>if</code> or <code>elseif</code> is false.
</p></dd></dl>
<a name="index-endif"></a>
<p><a name="endif"></a>
</p><dl>
<dt><a name="index-endif-1"></a><u>MGL command:</u> <b>endif</b></dt>
<dd><p>Finishes <code>if/elseif/else</code> block.
</p></dd></dl>

<a name="index-for"></a>
<p><a name="for"></a>
</p><dl>
<dt><a name="index-for-1"></a><u>MGL command:</u> <b>for</b><i> $N <code>v1 v2 [dv=1]</code></i></dt>
<dd><p>Starts cycle with $<var>N</var>-th argument changing from <var>v1</var> to <var>v2</var> with the step <var>dv</var>. Here <var>N</var> is digit (0...9) or alpha (a...z).
</p></dd></dl>
<dl>
<dt><a name="index-for-2"></a><u>MGL command:</u> <b>for</b><i> $N dat</i></dt>
<dd><p>Starts cycle with $<var>N</var>-th argument changing for <var>dat</var> values. Here <var>N</var> is digit (0...9) or alpha (a...z).
</p></dd></dl>
<a name="index-next"></a>
<p><a name="next"></a>
</p><dl>
<dt><a name="index-next-1"></a><u>MGL command:</u> <b>next</b></dt>
<dd><p>Finishes <code>for</code> cycle.
</p></dd></dl>

<a name="index-once"></a>
<p><a name="once"></a>
</p><dl>
<dt><a name="index-once-1"></a><u>MGL command:</u> <b>once</b><i> <code>val</code></i></dt>
<dd><p>The code between <code>once on</code> and <code>once off</code> will be executed only once. Useful for large data manipulation in programs like UDAV.
</p></dd></dl>
<a name="index-stop-1"></a>
<p><a name="stop"></a>
</p><dl>
<dt><a name="index-stop-2"></a><u>MGL command:</u> <b>stop</b></dt>
<dd><p>Terminate execution.
</p></dd></dl>


<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="mathgl_en_66.html#MGL-definition" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_68.html#mglParse-class" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en_65.html#MGL-scripts" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_65.html#MGL-scripts" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_69.html#UDAV" title="Next chapter"> &gt;&gt; </a>]</td>
</tr></table>
<p>
 <font size="-1">
  This document was generated by <em>Build Daemon user</em> on <em>December 22, 2013</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
 </font>
 <br>

</p>
</body>
</html>