File: Getting-Help.html

package info (click to toggle)
octave 10.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 145,388 kB
  • sloc: cpp: 335,976; ansic: 82,241; fortran: 20,963; objc: 9,402; sh: 8,756; yacc: 4,392; lex: 4,333; perl: 1,544; java: 1,366; awk: 1,259; makefile: 660; xml: 192
file content (447 lines) | stat: -rw-r--r-- 33,749 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
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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Getting Help (GNU Octave (version 10.3.0))</title>

<meta name="description" content="Getting Help (GNU Octave (version 10.3.0))">
<meta name="keywords" content="Getting Help (GNU Octave (version 10.3.0))">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Concept-Index.html" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Getting-Started.html" rel="up" title="Getting Started">
<link href="Command-Line-Editing.html" rel="next" title="Command Line Editing">
<link href="Quitting-Octave.html" rel="prev" title="Quitting Octave">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
div.example {margin-left: 3.2em}
kbd.kbd {font-style: oblique}
span:hover a.copiable-link {visibility: visible}
strong.def-name {font-family: monospace; font-weight: bold; font-size: larger}
-->
</style>
<link rel="stylesheet" type="text/css" href="octave.css">


</head>

<body lang="en">
<div class="section-level-extent" id="Getting-Help">
<div class="nav-panel">
<p>
Next: <a href="Command-Line-Editing.html" accesskey="n" rel="next">Command Line Editing</a>, Previous: <a href="Quitting-Octave.html" accesskey="p" rel="prev">Quitting Octave</a>, Up: <a href="Getting-Started.html" accesskey="u" rel="up">Getting Started</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h3 class="section" id="Commands-for-Getting-Help"><span>2.3 Commands for Getting Help<a class="copiable-link" href="#Commands-for-Getting-Help"> &para;</a></span></h3>
<a class="index-entry-id" id="index-online-help"></a>
<a class="index-entry-id" id="index-help_002c-online"></a>

<p>The entire text of this manual is available from the Octave prompt
via the command <kbd class="kbd">doc</kbd>.  In addition, the documentation for
individual user-written functions and variables is also available via
the <kbd class="kbd">help</kbd> command.  This section describes the commands used for
reading the manual and the documentation strings for user-supplied
functions and variables.  See <a class="xref" href="Function-Files.html">Function Files</a>, for more information
about how to document the functions you write.
</p>
<a class="anchor" id="XREFhelp"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-help"><span><strong class="def-name">help</strong> <code class="def-code-arguments"><var class="var">name</var></code><a class="copiable-link" href="#index-help"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-help-1"><span><strong class="def-name">help</strong> <code class="def-code-arguments">--list</code><a class="copiable-link" href="#index-help-1"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-help-2"><span><strong class="def-name">help</strong> <code class="def-code-arguments">.</code><a class="copiable-link" href="#index-help-2"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-help-3"><span><strong class="def-name">help</strong><a class="copiable-link" href="#index-help-3"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-help-4"><span><code class="def-type"><var class="var">help_text</var> =</code> <strong class="def-name">help</strong> <code class="def-code-arguments">(&hellip;)</code><a class="copiable-link" href="#index-help-4"> &para;</a></span></dt>
<dd><p>Display the help text for <var class="var">name</var>.
</p>
<p>For example, the command <kbd class="kbd">help help</kbd> prints a short message describing
the <code class="code">help</code> command.
</p>
<p>Given the single argument <code class="code">--list</code>, list all operators, keywords,
built-in functions, and loadable functions available in the current session
of Octave.
</p>
<p>Given the single argument <code class="code">.</code>, list all operators available in the
current session of Octave.
</p>
<p>If invoked without any arguments, <code class="code">help</code> displays instructions on how
to access help from the command line.
</p>
<p>The help command can provide information about most operators, but
<var class="var">name</var> must be enclosed by single or double quotes to prevent
the Octave interpreter from acting on <var class="var">name</var>.  For example,
<code class="code">help &quot;+&quot;</code> displays help on the addition operator.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="#XREFdoc">doc</a>, <a class="ref" href="#XREFlookfor">lookfor</a>, <a class="ref" href="Status-of-Variables.html#XREFwhich">which</a>, <a class="ref" href="#XREFinfo">info</a>.
</p></dd></dl>


<a class="anchor" id="XREFdoc"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-doc"><span><strong class="def-name">doc</strong> <code class="def-code-arguments"><var class="var">function_name</var></code><a class="copiable-link" href="#index-doc"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-doc-1"><span><strong class="def-name">doc</strong><a class="copiable-link" href="#index-doc-1"> &para;</a></span></dt>
<dd><p>Display documentation for the function <var class="var">function_name</var> directly from an
online version of the printed manual, using the GNU Info browser.
</p>
<p>If invoked without an argument, the manual is shown from the beginning.
</p>
<p>For example, the command <kbd class="kbd">doc rand</kbd> starts the GNU Info browser at the
<code class="code">rand</code> node in the online version of the manual.
</p>
<p>Once the GNU Info browser is running, help for using it is available using
the command <kbd class="kbd">C-h</kbd>.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="#XREFhelp">help</a>.
</p></dd></dl>


<a class="anchor" id="XREFlookfor"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-lookfor"><span><strong class="def-name">lookfor</strong> <code class="def-code-arguments"><var class="var">str</var></code><a class="copiable-link" href="#index-lookfor"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-lookfor-1"><span><strong class="def-name">lookfor</strong> <code class="def-code-arguments">-all <var class="var">str</var></code><a class="copiable-link" href="#index-lookfor-1"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-lookfor-2"><span><code class="def-type">[<var class="var">fcn</var>, <var class="var">help1str</var>] =</code> <strong class="def-name">lookfor</strong> <code class="def-code-arguments">(<var class="var">str</var>)</code><a class="copiable-link" href="#index-lookfor-2"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-lookfor-3"><span><code class="def-type">[<var class="var">fcn</var>, <var class="var">help1str</var>] =</code> <strong class="def-name">lookfor</strong> <code class="def-code-arguments">(&quot;-all&quot;, <var class="var">str</var>)</code><a class="copiable-link" href="#index-lookfor-3"> &para;</a></span></dt>
<dd><p>Search for the string <var class="var">str</var> in the documentation of all functions in the
current function search path.
</p>
<p>By default, <code class="code">lookfor</code> looks for <var class="var">str</var> in just the first sentence of
the help string for each function found.  The entire help text of each
function can be searched by using the <code class="code">&quot;-all&quot;</code> argument.  All searches
are case insensitive.
</p>
<p>When called with no output arguments, <code class="code">lookfor</code> prints the list of
matching functions to the terminal.  Otherwise, the output argument
<var class="var">fcns</var> contains the function names and <var class="var">help1str</var> contains the first
sentence from the help string of each function.
</p>
<p>Programming Note: The ability of <code class="code">lookfor</code> to correctly identify the
first sentence of the help text is dependent on the format of the function&rsquo;s
help.  All Octave core functions are correctly formatted, but the same can
not be guaranteed for external packages and user-supplied functions.
Therefore, the use of the <code class="code">&quot;-all&quot;</code> argument may be necessary to find
related functions that are not a part of Octave.
</p>
<p>The speed of lookup is greatly enhanced by having a cached documentation
file.  For more information,
see <a class="pxref" href="#XREFdoc_005fcache_005fcreate"><code class="code">doc_cache_create</code></a>.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="#XREFhelp">help</a>, <a class="ref" href="#XREFdoc">doc</a>, <a class="ref" href="Status-of-Variables.html#XREFwhich">which</a>, <a class="ref" href="Manipulating-the-Load-Path.html#XREFpath">path</a>, <a class="ref" href="#XREFdoc_005fcache_005fcreate">doc_cache_create</a>.
</p></dd></dl>


<p>To see what is new in the current release of Octave, use the <code class="code">news</code>
function.
</p>
<a class="anchor" id="XREFnews"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-news"><span><strong class="def-name">news</strong><a class="copiable-link" href="#index-news"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-news-1"><span><strong class="def-name">news</strong> <code class="def-code-arguments"><var class="var">package</var></code><a class="copiable-link" href="#index-news-1"> &para;</a></span></dt>
<dd><p>Display the current NEWS file for Octave or an installed package.
</p>
<p>When called without an argument, display the NEWS file for Octave.
</p>
<p>When given a package name <var class="var">package</var>, display the current NEWS file for
that package.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="System-Information.html#XREFver">ver</a>, <a class="ref" href="Installing-and-Removing-Packages.html#XREFpkg">pkg</a>.
</p></dd></dl>


<a class="anchor" id="XREFinfo"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-info"><span><strong class="def-name">info</strong> <code class="def-code-arguments">()</code><a class="copiable-link" href="#index-info"> &para;</a></span></dt>
<dd><p>Display contact information for the GNU Octave community.
</p></dd></dl>


<a class="anchor" id="XREFwarranty"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-warranty-1"><span><strong class="def-name">warranty</strong> <code class="def-code-arguments">()</code><a class="copiable-link" href="#index-warranty-1"> &para;</a></span></dt>
<dd><p>Describe the conditions for copying and distributing Octave.
</p></dd></dl>


<p>The following functions can be used to change which programs are used
for displaying the documentation, and where the documentation can be
found.
</p>
<a class="anchor" id="XREFinfo_005ffile"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-info_005ffile"><span><code class="def-type"><var class="var">val</var> =</code> <strong class="def-name">info_file</strong> <code class="def-code-arguments">()</code><a class="copiable-link" href="#index-info_005ffile"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-info_005ffile-1"><span><code class="def-type"><var class="var">old_val</var> =</code> <strong class="def-name">info_file</strong> <code class="def-code-arguments">(<var class="var">new_val</var>)</code><a class="copiable-link" href="#index-info_005ffile-1"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-info_005ffile-2"><span><code class="def-type"><var class="var">old_val</var> =</code> <strong class="def-name">info_file</strong> <code class="def-code-arguments">(<var class="var">new_val</var>, &quot;local&quot;)</code><a class="copiable-link" href="#index-info_005ffile-2"> &para;</a></span></dt>
<dd><p>Query or set the internal variable that specifies the name of the
Octave info file.
</p>
<p>The default value is
<samp class="file"><var class="var">octave-home</var>/share/info/octave.info</samp>, in
which <var class="var">octave-home</var> is the root directory of the Octave installation.
The default value may be overridden by the environment variable
<code class="env">OCTAVE_INFO_FILE</code><!-- /@w -->, or the command line argument
<samp class="option">--info-file FNAME</samp>.
</p>
<p>When called from inside a function with the <code class="code">&quot;local&quot;</code> option, the
variable is changed locally for the function and any subroutines it calls.
The original variable value is restored when exiting the function.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="#XREFinfo_005fprogram">info_program</a>, <a class="ref" href="#XREFdoc">doc</a>, <a class="ref" href="#XREFhelp">help</a>, <a class="ref" href="#XREFmakeinfo_005fprogram">makeinfo_program</a>.
</p></dd></dl>


<a class="anchor" id="XREFinfo_005fprogram"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-info_005fprogram"><span><code class="def-type"><var class="var">val</var> =</code> <strong class="def-name">info_program</strong> <code class="def-code-arguments">()</code><a class="copiable-link" href="#index-info_005fprogram"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-info_005fprogram-1"><span><code class="def-type"><var class="var">old_val</var> =</code> <strong class="def-name">info_program</strong> <code class="def-code-arguments">(<var class="var">new_val</var>)</code><a class="copiable-link" href="#index-info_005fprogram-1"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-info_005fprogram-2"><span><code class="def-type"><var class="var">old_val</var> =</code> <strong class="def-name">info_program</strong> <code class="def-code-arguments">(<var class="var">new_val</var>, &quot;local&quot;)</code><a class="copiable-link" href="#index-info_005fprogram-2"> &para;</a></span></dt>
<dd><p>Query or set the internal variable that specifies the name of the
info program to run.
</p>
<p>The default value is <samp class="file">info</samp>.  The default value may be
overridden by the environment variable <code class="env">OCTAVE_INFO_PROGRAM</code><!-- /@w -->, or the
command line argument <samp class="option">--info-program NAME</samp>.
</p>
<p>When called from inside a function with the <code class="code">&quot;local&quot;</code> option, the
variable is changed locally for the function and any subroutines it calls.
The original variable value is restored when exiting the function.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="#XREFinfo_005ffile">info_file</a>, <a class="ref" href="#XREFdoc">doc</a>, <a class="ref" href="#XREFhelp">help</a>, <a class="ref" href="#XREFmakeinfo_005fprogram">makeinfo_program</a>.
</p></dd></dl>


<a class="anchor" id="XREFmakeinfo_005fprogram"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-makeinfo_005fprogram"><span><code class="def-type"><var class="var">val</var> =</code> <strong class="def-name">makeinfo_program</strong> <code class="def-code-arguments">()</code><a class="copiable-link" href="#index-makeinfo_005fprogram"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-makeinfo_005fprogram-1"><span><code class="def-type"><var class="var">old_val</var> =</code> <strong class="def-name">makeinfo_program</strong> <code class="def-code-arguments">(<var class="var">new_val</var>)</code><a class="copiable-link" href="#index-makeinfo_005fprogram-1"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-makeinfo_005fprogram-2"><span><code class="def-type"><var class="var">old_val</var> =</code> <strong class="def-name">makeinfo_program</strong> <code class="def-code-arguments">(<var class="var">new_val</var>, &quot;local&quot;)</code><a class="copiable-link" href="#index-makeinfo_005fprogram-2"> &para;</a></span></dt>
<dd><p>Query or set the internal variable that specifies the name of the
program that Octave runs to format help text containing
Texinfo markup commands.
</p>
<p>The default value is <code class="code">makeinfo</code>.
</p>
<p>When called from inside a function with the <code class="code">&quot;local&quot;</code> option, the
variable is changed locally for the function and any subroutines it calls.
The original variable value is restored when exiting the function.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="#XREFtexi_005fmacros_005ffile">texi_macros_file</a>, <a class="ref" href="#XREFinfo_005ffile">info_file</a>, <a class="ref" href="#XREFinfo_005fprogram">info_program</a>, <a class="ref" href="#XREFdoc">doc</a>, <a class="ref" href="#XREFhelp">help</a>.
</p></dd></dl>


<a class="anchor" id="XREFtexi_005fmacros_005ffile"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-texi_005fmacros_005ffile"><span><code class="def-type"><var class="var">val</var> =</code> <strong class="def-name">texi_macros_file</strong> <code class="def-code-arguments">()</code><a class="copiable-link" href="#index-texi_005fmacros_005ffile"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-texi_005fmacros_005ffile-1"><span><code class="def-type"><var class="var">old_val</var> =</code> <strong class="def-name">texi_macros_file</strong> <code class="def-code-arguments">(<var class="var">new_val</var>)</code><a class="copiable-link" href="#index-texi_005fmacros_005ffile-1"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-texi_005fmacros_005ffile-2"><span><code class="def-type"><var class="var">old_val</var> =</code> <strong class="def-name">texi_macros_file</strong> <code class="def-code-arguments">(<var class="var">new_val</var>, &quot;local&quot;)</code><a class="copiable-link" href="#index-texi_005fmacros_005ffile-2"> &para;</a></span></dt>
<dd><p>Query or set the internal variable that specifies the name of the
file containing Texinfo macros that are prepended to documentation strings
before they are passed to makeinfo.
</p>
<p>The default value is
<samp class="file"><var class="var">octave-home</var>/share/octave/<var class="var">version</var>/etc/macros.texi</samp>,
in which <var class="var">octave-home</var> is the root directory of the Octave installation,
and <var class="var">version</var> is the Octave version number.
The default value may be overridden by the environment variable
<code class="env">OCTAVE_TEXI_MACROS_FILE</code><!-- /@w -->, or the command line argument
<samp class="option">--texi-macros-file FNAME</samp>.
</p>
<p>When called from inside a function with the <code class="code">&quot;local&quot;</code> option, the
variable is changed locally for the function and any subroutines it calls.
The original variable value is restored when exiting the function.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="#XREFmakeinfo_005fprogram">makeinfo_program</a>.
</p></dd></dl>


<a class="anchor" id="XREFdoc_005fcache_005ffile"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-doc_005fcache_005ffile"><span><code class="def-type"><var class="var">val</var> =</code> <strong class="def-name">doc_cache_file</strong> <code class="def-code-arguments">()</code><a class="copiable-link" href="#index-doc_005fcache_005ffile"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-doc_005fcache_005ffile-1"><span><code class="def-type"><var class="var">old_val</var> =</code> <strong class="def-name">doc_cache_file</strong> <code class="def-code-arguments">(<var class="var">new_val</var>)</code><a class="copiable-link" href="#index-doc_005fcache_005ffile-1"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-doc_005fcache_005ffile-2"><span><code class="def-type"><var class="var">old_val</var> =</code> <strong class="def-name">doc_cache_file</strong> <code class="def-code-arguments">(<var class="var">new_val</var>, &quot;local&quot;)</code><a class="copiable-link" href="#index-doc_005fcache_005ffile-2"> &para;</a></span></dt>
<dd><p>Query or set the internal variable that specifies the name of the
Octave documentation cache file.
</p>
<p>A cache file significantly improves the performance of the <code class="code">lookfor</code>
command.  The default value is
<samp class="file"><var class="var">octave-home</var>/share/octave/<var class="var">version</var>/etc/doc-cache</samp>,
in which <var class="var">octave-home</var> is the root directory of the Octave installation,
and <var class="var">version</var> is the Octave version number.
The default value may be overridden by the environment variable
<code class="env">OCTAVE_DOC_CACHE_FILE</code><!-- /@w -->, or the command line argument
<samp class="option">--doc-cache-file FNAME</samp>.
</p>
<p>When called from inside a function with the <code class="code">&quot;local&quot;</code> option, the
variable is changed locally for the function and any subroutines it calls.
The original variable value is restored when exiting the function.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="#XREFdoc_005fcache_005fcreate">doc_cache_create</a>, <a class="ref" href="#XREFlookfor">lookfor</a>, <a class="ref" href="#XREFinfo_005fprogram">info_program</a>, <a class="ref" href="#XREFdoc">doc</a>, <a class="ref" href="#XREFhelp">help</a>, <a class="ref" href="#XREFmakeinfo_005fprogram">makeinfo_program</a>.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="#XREFlookfor">lookfor</a>.
</p></dd></dl>


<a class="anchor" id="XREFbuilt_005fin_005fdocstrings_005ffile"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-built_005fin_005fdocstrings_005ffile"><span><code class="def-type"><var class="var">val</var> =</code> <strong class="def-name">built_in_docstrings_file</strong> <code class="def-code-arguments">()</code><a class="copiable-link" href="#index-built_005fin_005fdocstrings_005ffile"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-built_005fin_005fdocstrings_005ffile-1"><span><code class="def-type"><var class="var">old_val</var> =</code> <strong class="def-name">built_in_docstrings_file</strong> <code class="def-code-arguments">(<var class="var">new_val</var>)</code><a class="copiable-link" href="#index-built_005fin_005fdocstrings_005ffile-1"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-built_005fin_005fdocstrings_005ffile-2"><span><code class="def-type"><var class="var">old_val</var> =</code> <strong class="def-name">built_in_docstrings_file</strong> <code class="def-code-arguments">(<var class="var">new_val</var>, &quot;local&quot;)</code><a class="copiable-link" href="#index-built_005fin_005fdocstrings_005ffile-2"> &para;</a></span></dt>
<dd><p>Query or set the internal variable that specifies the name of the
file containing docstrings for built-in Octave functions.
</p>
<p>The default value is
<samp class="file"><var class="var">octave-home</var>/share/octave/<var class="var">version</var>/etc/built-in-docstrings</samp>,
in which <var class="var">octave-home</var> is the root directory of the Octave installation,
and <var class="var">version</var> is the Octave version number.  The default value may be
overridden by the environment variable
<code class="env">OCTAVE_BUILT_IN_DOCSTRINGS_FILE</code><!-- /@w -->, or the command line argument
<samp class="option">--built-in-docstrings-file FNAME</samp>.
</p>
<p>Note: This variable is only used when Octave is initializing itself.
Modifying it during a running session of Octave will have no effect.
</p></dd></dl>


<a class="anchor" id="XREFsuppress_005fverbose_005fhelp_005fmessage"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-suppress_005fverbose_005fhelp_005fmessage"><span><code class="def-type"><var class="var">val</var> =</code> <strong class="def-name">suppress_verbose_help_message</strong> <code class="def-code-arguments">()</code><a class="copiable-link" href="#index-suppress_005fverbose_005fhelp_005fmessage"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-suppress_005fverbose_005fhelp_005fmessage-1"><span><code class="def-type"><var class="var">old_val</var> =</code> <strong class="def-name">suppress_verbose_help_message</strong> <code class="def-code-arguments">(<var class="var">new_val</var>)</code><a class="copiable-link" href="#index-suppress_005fverbose_005fhelp_005fmessage-1"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-suppress_005fverbose_005fhelp_005fmessage-2"><span><code class="def-type"><var class="var">old_val</var> =</code> <strong class="def-name">suppress_verbose_help_message</strong> <code class="def-code-arguments">(<var class="var">new_val</var>, &quot;local&quot;)</code><a class="copiable-link" href="#index-suppress_005fverbose_005fhelp_005fmessage-2"> &para;</a></span></dt>
<dd><p>Query or set the internal variable that controls whether Octave
will add additional help information to the end of the output from
the <code class="code">help</code> command and usage messages for built-in commands.
</p>
<p>When called from inside a function with the <code class="code">&quot;local&quot;</code> option, the
variable is changed locally for the function and any subroutines it calls.
The original variable value is restored when exiting the function.
</p></dd></dl>


<p>The following functions are principally used internally by Octave for
generating the documentation.  They are documented here for completeness
and because they may occasionally be useful for users.
</p>
<a class="anchor" id="XREFdoc_005fcache_005fcreate"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-doc_005fcache_005fcreate"><span><strong class="def-name">doc_cache_create</strong> <code class="def-code-arguments">(<var class="var">out_file</var>, <var class="var">directory</var>)</code><a class="copiable-link" href="#index-doc_005fcache_005fcreate"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-doc_005fcache_005fcreate-1"><span><strong class="def-name">doc_cache_create</strong> <code class="def-code-arguments">(<var class="var">out_file</var>)</code><a class="copiable-link" href="#index-doc_005fcache_005fcreate-1"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-doc_005fcache_005fcreate-2"><span><strong class="def-name">doc_cache_create</strong> <code class="def-code-arguments">()</code><a class="copiable-link" href="#index-doc_005fcache_005fcreate-2"> &para;</a></span></dt>
<dd><p>Generate documentation cache for all functions in <var class="var">directory</var>.
</p>
<p>A documentation cache is generated for all functions in <var class="var">directory</var>
which may be a single string or a cell array of strings.  The cache is used
to speed up the function <code class="code">lookfor</code>.
</p>
<p>The cache is saved in the file <var class="var">out_file</var> which defaults to the value
<samp class="file">doc-cache</samp> if not given.
</p>
<p>If no directory is given (or it is the empty matrix), a cache for built-in
functions, operators, and keywords is generated.
</p>

<p><strong class="strong">See also:</strong> <a class="ref" href="#XREFdoc_005fcache_005ffile">doc_cache_file</a>, <a class="ref" href="#XREFlookfor">lookfor</a>, <a class="ref" href="Manipulating-the-Load-Path.html#XREFpath">path</a>.
</p></dd></dl>


<a class="anchor" id="XREFget_005fhelp_005ftext"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-get_005fhelp_005ftext"><span><code class="def-type">[<var class="var">text</var>, <var class="var">format</var>] =</code> <strong class="def-name">get_help_text</strong> <code class="def-code-arguments">(<var class="var">name</var>)</code><a class="copiable-link" href="#index-get_005fhelp_005ftext"> &para;</a></span></dt>
<dd><p>Return the raw help text of function <var class="var">name</var>.
</p>
<p>The raw help text is returned in <var class="var">text</var> and the format in <var class="var">format</var>.
The format is a string which is one of <code class="code">&quot;texinfo&quot;</code>, <code class="code">&quot;html&quot;</code>, or
<code class="code">&quot;plain&nbsp;text&quot;</code><!-- /@w -->.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="#XREFget_005fhelp_005ftext_005ffrom_005ffile">get_help_text_from_file</a>.
</p></dd></dl>


<a class="anchor" id="XREFget_005fhelp_005ftext_005ffrom_005ffile"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-get_005fhelp_005ftext_005ffrom_005ffile"><span><code class="def-type">[<var class="var">text</var>, <var class="var">format</var>] =</code> <strong class="def-name">get_help_text_from_file</strong> <code class="def-code-arguments">(<var class="var">fname</var>)</code><a class="copiable-link" href="#index-get_005fhelp_005ftext_005ffrom_005ffile"> &para;</a></span></dt>
<dd><p>Return the raw help text from the file <var class="var">fname</var>.
</p>
<p>The raw help text is returned in <var class="var">text</var> and the format in <var class="var">format</var>.
The format is a string which is one of <code class="code">&quot;texinfo&quot;</code>, <code class="code">&quot;html&quot;</code>, or
<code class="code">&quot;plain&nbsp;text&quot;</code><!-- /@w -->.
</p>
<p><strong class="strong">See also:</strong> <a class="ref" href="#XREFget_005fhelp_005ftext">get_help_text</a>.
</p></dd></dl>


<a class="anchor" id="XREFget_005ffirst_005fhelp_005fsentence"></a><span style="display:block; margin-top:-4.5ex;">&nbsp;</span>


<dl class="first-deftypefn">
<dt class="deftypefn" id="index-get_005ffirst_005fhelp_005fsentence"><span><code class="def-type"><var class="var">text</var> =</code> <strong class="def-name">get_first_help_sentence</strong> <code class="def-code-arguments">(<var class="var">name</var>)</code><a class="copiable-link" href="#index-get_005ffirst_005fhelp_005fsentence"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-get_005ffirst_005fhelp_005fsentence-1"><span><code class="def-type"><var class="var">text</var> =</code> <strong class="def-name">get_first_help_sentence</strong> <code class="def-code-arguments">(<var class="var">name</var>, <var class="var">max_len</var>)</code><a class="copiable-link" href="#index-get_005ffirst_005fhelp_005fsentence-1"> &para;</a></span></dt>
<dt class="deftypefnx def-cmd-deftypefn" id="index-get_005ffirst_005fhelp_005fsentence-2"><span><code class="def-type">[<var class="var">text</var>, <var class="var">status</var>] =</code> <strong class="def-name">get_first_help_sentence</strong> <code class="def-code-arguments">(&hellip;)</code><a class="copiable-link" href="#index-get_005ffirst_005fhelp_005fsentence-2"> &para;</a></span></dt>
<dd><p>Return the first sentence of a function&rsquo;s help text.
</p>
<p>The first sentence is defined as the text after the function declaration
until either the first period (&quot;.&quot;) or the first appearance of two
consecutive newlines (&quot;\n\n&quot;).  The text is truncated to a maximum length of
<var class="var">max_len</var>, which defaults to 80.  If the text must be truncated the last
three characters of the text are replaced with <code class="code">&quot;...&quot;</code> to indicate
that more text was available.
</p>
<p>The optional output argument <var class="var">status</var> returns the status reported by
<code class="code">makeinfo</code>.  If only one output argument is requested, and <var class="var">status</var>
is nonzero, a warning is displayed.
</p>
<p>As an example, the first sentence of this help text is
</p>
<div class="example">
<div class="group"><pre class="example-preformatted">get_first_help_sentence (&quot;get_first_help_sentence&quot;)
-| ans = Return the first sentence of a function's help text.
</pre></div></div>
</dd></dl>


</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="Command-Line-Editing.html">Command Line Editing</a>, Previous: <a href="Quitting-Octave.html">Quitting Octave</a>, Up: <a href="Getting-Started.html">Getting Started</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>