annotate libinterp/corefcn/help.cc @ 17829:c2d9d42f4fe1

which: return the full path to a regular file (bug #40332) * libinterp/corefcn/help.cc (do_which): Return absolute path for file queries.
author Mike Miller <mtmiller@ieee.org>
date Sat, 02 Nov 2013 14:46:43 -0400
parents 175b392e91fe
children b560bac0fca2 64f178d8e1e0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
1 /*
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
2
17744
d63878346099 maint: Update copyright notices for release.
John W. Eaton <jwe@octave.org>
parents: 17311
diff changeset
3 Copyright (C) 1993-2013 John W. Eaton
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
4
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
6
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
9 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
10 option) any later version.
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
11
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
15 for more details.
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
16
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
18 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
19 <http://www.gnu.org/licenses/>.
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
20
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
21 */
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
22
240
a99f28f5e351 [project @ 1993-11-30 20:24:36 by jwe]
jwe
parents: 1
diff changeset
23 #ifdef HAVE_CONFIG_H
1192
b6360f2d4fa6 [project @ 1995-03-30 21:38:35 by jwe]
jwe
parents: 1155
diff changeset
24 #include <config.h>
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
25 #endif
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
26
1343
94bedeb289e5 [project @ 1995-09-04 00:29:21 by jwe]
jwe
parents: 1315
diff changeset
27 #include <cstdlib>
94bedeb289e5 [project @ 1995-09-04 00:29:21 by jwe]
jwe
parents: 1315
diff changeset
28 #include <cstring>
94bedeb289e5 [project @ 1995-09-04 00:29:21 by jwe]
jwe
parents: 1315
diff changeset
29
5769
2b9a5ce46678 [project @ 2006-04-18 15:57:06 by jwe]
jwe
parents: 5768
diff changeset
30 #include <algorithm>
3503
d14c483b3c12 [project @ 2000-02-01 04:06:07 by jwe]
jwe
parents: 3408
diff changeset
31 #include <iostream>
d14c483b3c12 [project @ 2000-02-01 04:06:07 by jwe]
jwe
parents: 3408
diff changeset
32 #include <fstream>
5765
7ba9ad1fec11 [project @ 2006-04-17 05:05:15 by jwe]
jwe
parents: 5738
diff changeset
33 #include <sstream>
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
34 #include <string>
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
35
1295
34295bf6aac6 [project @ 1995-05-01 18:24:48 by jwe]
jwe
parents: 1288
diff changeset
36 #include <sys/types.h>
34295bf6aac6 [project @ 1995-05-01 18:24:48 by jwe]
jwe
parents: 1288
diff changeset
37 #include <unistd.h>
1343
94bedeb289e5 [project @ 1995-09-04 00:29:21 by jwe]
jwe
parents: 1315
diff changeset
38
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3259
diff changeset
39 #include "cmd-edit.h"
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3259
diff changeset
40 #include "file-ops.h"
6253
f1676652d808 [project @ 2007-01-24 20:43:36 by jwe]
jwe
parents: 6243
diff changeset
41 #include "file-stat.h"
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2900
diff changeset
42 #include "oct-env.h"
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
43 #include "str-vec.h"
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
44
2492
06595bc7f2d0 [project @ 1996-11-09 00:13:50 by jwe]
jwe
parents: 2470
diff changeset
45 #include <defaults.h>
1352
19c10b8657d5 [project @ 1995-09-05 08:11:57 by jwe]
jwe
parents: 1350
diff changeset
46 #include "defun.h"
19c10b8657d5 [project @ 1995-09-05 08:11:57 by jwe]
jwe
parents: 1350
diff changeset
47 #include "dirfns.h"
19c10b8657d5 [project @ 1995-09-05 08:11:57 by jwe]
jwe
parents: 1350
diff changeset
48 #include "error.h"
2202
31b62b7c5d2d [project @ 1996-05-15 06:07:11 by jwe]
jwe
parents: 2189
diff changeset
49 #include "gripes.h"
1352
19c10b8657d5 [project @ 1995-09-05 08:11:57 by jwe]
jwe
parents: 1350
diff changeset
50 #include "help.h"
2177
0bddc913621b [project @ 1996-05-13 16:36:11 by jwe]
jwe
parents: 2124
diff changeset
51 #include "input.h"
5832
5e41e06f6a78 [project @ 2006-05-26 21:41:32 by jwe]
jwe
parents: 5823
diff changeset
52 #include "load-path.h"
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
53 #include "oct-obj.h"
2976
641689f67673 [project @ 1997-05-15 20:27:04 by jwe]
jwe
parents: 2962
diff changeset
54 #include "ov-usr-fcn.h"
1352
19c10b8657d5 [project @ 1995-09-05 08:11:57 by jwe]
jwe
parents: 1350
diff changeset
55 #include "pager.h"
3018
5708b8bb4f06 [project @ 1997-06-03 21:48:05 by jwe]
jwe
parents: 3016
diff changeset
56 #include "parse.h"
1466
2f85a175308f [project @ 1995-09-22 07:48:59 by jwe]
jwe
parents: 1443
diff changeset
57 #include "pathsearch.h"
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3259
diff changeset
58 #include "procstream.h"
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7272
diff changeset
59 #include "pt-pr-code.h"
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 389
diff changeset
60 #include "sighandlers.h"
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 389
diff changeset
61 #include "symtab.h"
2694
13f134a00f12 [project @ 1997-02-18 15:33:28 by jwe]
jwe
parents: 2692
diff changeset
62 #include "syswait.h"
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
63 #include "toplev.h"
8672
2a49c32d4322 allow help to work with files containing only comments
John W. Eaton <jwe@octave.org>
parents: 8631
diff changeset
64 #include "unwind-prot.h"
242
742c4795aea9 [project @ 1993-11-30 21:26:43 by jwe]
jwe
parents: 240
diff changeset
65 #include "utils.h"
1352
19c10b8657d5 [project @ 1995-09-05 08:11:57 by jwe]
jwe
parents: 1350
diff changeset
66 #include "variables.h"
3301
02866242d3ae [project @ 1999-10-20 04:10:46 by jwe]
jwe
parents: 3296
diff changeset
67 #include "version.h"
5447
051ddd7a6681 [project @ 2005-09-14 05:18:23 by jwe]
jwe
parents: 5399
diff changeset
68 #include "quit.h"
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 389
diff changeset
69
8861
31f864877246 doc and lookfor fixes
John W. Eaton <jwe@octave.org>
parents: 8812
diff changeset
70 // Name of the doc cache file specified on the command line.
31f864877246 doc and lookfor fixes
John W. Eaton <jwe@octave.org>
parents: 8812
diff changeset
71 // (--doc-cache-file file)
31f864877246 doc and lookfor fixes
John W. Eaton <jwe@octave.org>
parents: 8812
diff changeset
72 std::string Vdoc_cache_file;
31f864877246 doc and lookfor fixes
John W. Eaton <jwe@octave.org>
parents: 8812
diff changeset
73
14614
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
74 // Name of the file containing local Texinfo macros that are prepended
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
75 // to doc strings before processing.
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
76 // (--texi-macros-file)
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
77 std::string Vtexi_macros_file;
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
78
2202
31b62b7c5d2d [project @ 1996-05-15 06:07:11 by jwe]
jwe
parents: 2189
diff changeset
79 // Name of the info file specified on command line.
31b62b7c5d2d [project @ 1996-05-15 06:07:11 by jwe]
jwe
parents: 2189
diff changeset
80 // (--info-file file)
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3503
diff changeset
81 std::string Vinfo_file;
2202
31b62b7c5d2d [project @ 1996-05-15 06:07:11 by jwe]
jwe
parents: 2189
diff changeset
82
31b62b7c5d2d [project @ 1996-05-15 06:07:11 by jwe]
jwe
parents: 2189
diff changeset
83 // Name of the info reader we'd like to use.
31b62b7c5d2d [project @ 1996-05-15 06:07:11 by jwe]
jwe
parents: 2189
diff changeset
84 // (--info-program program)
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
85 std::string Vinfo_program;
2202
31b62b7c5d2d [project @ 1996-05-15 06:07:11 by jwe]
jwe
parents: 2189
diff changeset
86
3686
9507d6de9bbd [project @ 2000-06-29 16:30:44 by jwe]
jwe
parents: 3584
diff changeset
87 // Name of the makeinfo program to run.
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
88 static std::string Vmakeinfo_program = "makeinfo";
3686
9507d6de9bbd [project @ 2000-06-29 16:30:44 by jwe]
jwe
parents: 3584
diff changeset
89
2189
d01936305d99 [project @ 1996-05-14 03:31:57 by jwe]
jwe
parents: 2177
diff changeset
90 // If TRUE, don't print additional help message in help and usage
d01936305d99 [project @ 1996-05-14 03:31:57 by jwe]
jwe
parents: 2177
diff changeset
91 // functions.
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
92 static bool Vsuppress_verbose_help_message = false;
2189
d01936305d99 [project @ 1996-05-14 03:31:57 by jwe]
jwe
parents: 2177
diff changeset
93
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
94 #include <map>
3016
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
95
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
96 typedef std::map<std::string, std::string> map_type;
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
97 typedef map_type::value_type pair_type;
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
98 typedef map_type::const_iterator map_iter;
3016
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
99
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
100 template<typename T, std::size_t z>
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
101 std::size_t
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
102 size (T const (&)[z])
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
103 {
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
104 return z;
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
105 }
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
106
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
107 const static pair_type operators[] =
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
108 {
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
109 pair_type ("!",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
110 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
111 @deftypefn {Operator} {} !\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
112 Logical 'not' operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
113 @seealso{~, not}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
114 @end deftypefn"),
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
115
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
116 pair_type ("~",
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
117 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
118 @deftypefn {Operator} {} ~\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
119 Logical 'not' operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
120 @seealso{!, not}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
121 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
122
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
123 pair_type ("!=",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
124 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
125 @deftypefn {Operator} {} !=\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
126 Logical 'not equals' operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
127 @seealso{~=, ne}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
128 @end deftypefn"),
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
129
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
130 pair_type ("~=",
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
131 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
132 @deftypefn {Operator} {} ~=\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
133 Logical 'not equals' operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
134 @seealso{!=, ne}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
135 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
136
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
137 pair_type ("\"",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
138 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
139 @deftypefn {Operator} {} \"\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
140 String delimiter.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
141 @end deftypefn"),
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
142
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
143 pair_type ("#",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
144 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
145 @deftypefn {Operator} {} #\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
146 Begin comment character.\n\
14766
877263efaacc doc: Fix bug with Texinfo special characters within Seealso macro.
Rik <octave@nomad.inbox5.com>
parents: 14618
diff changeset
147 @seealso{%, #@\\{}\n\
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
148 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
149
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
150 pair_type ("%",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
151 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
152 @deftypefn {Operator} {} %\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
153 Begin comment character.\n\
14766
877263efaacc doc: Fix bug with Texinfo special characters within Seealso macro.
Rik <octave@nomad.inbox5.com>
parents: 14618
diff changeset
154 @seealso{#, %@\\{}\n\
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
155 @end deftypefn"),
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
156
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
157 pair_type ("#{",
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
158 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
159 @deftypefn {Operator} {} #@{\n\
13773
59e5f8e1d516 Fix block comment Texinfo not appearing in documentation
Rik <octave@nomad.inbox5.com>
parents: 13749
diff changeset
160 Begin block comment. There must be nothing else, other than\n\
59e5f8e1d516 Fix block comment Texinfo not appearing in documentation
Rik <octave@nomad.inbox5.com>
parents: 13749
diff changeset
161 whitespace, in the line both before and after @code{#@{}.\n\
59e5f8e1d516 Fix block comment Texinfo not appearing in documentation
Rik <octave@nomad.inbox5.com>
parents: 13749
diff changeset
162 It is possible to nest block comments.\n\
14766
877263efaacc doc: Fix bug with Texinfo special characters within Seealso macro.
Rik <octave@nomad.inbox5.com>
parents: 14618
diff changeset
163 @seealso{%@\\{, #@\\}, #}\n\
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
164 @end deftypefn"),
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
165
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
166 pair_type ("%{",
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
167 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
168 @deftypefn {Operator} {} %@{\n\
13773
59e5f8e1d516 Fix block comment Texinfo not appearing in documentation
Rik <octave@nomad.inbox5.com>
parents: 13749
diff changeset
169 Begin block comment. There must be nothing else, other than\n\
59e5f8e1d516 Fix block comment Texinfo not appearing in documentation
Rik <octave@nomad.inbox5.com>
parents: 13749
diff changeset
170 whitespace, in the line both before and after @code{%@{}.\n\
59e5f8e1d516 Fix block comment Texinfo not appearing in documentation
Rik <octave@nomad.inbox5.com>
parents: 13749
diff changeset
171 It is possible to nest block comments.\n\
14766
877263efaacc doc: Fix bug with Texinfo special characters within Seealso macro.
Rik <octave@nomad.inbox5.com>
parents: 14618
diff changeset
172 @seealso{#@\\{, %@\\}, %}\n\
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
173 @end deftypefn"),
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
174
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
175 pair_type ("#}",
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
176 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
177 @deftypefn {Operator} {} #@}\n\
13773
59e5f8e1d516 Fix block comment Texinfo not appearing in documentation
Rik <octave@nomad.inbox5.com>
parents: 13749
diff changeset
178 Close block comment. There must be nothing else, other than\n\
59e5f8e1d516 Fix block comment Texinfo not appearing in documentation
Rik <octave@nomad.inbox5.com>
parents: 13749
diff changeset
179 whitespace, in the line both before and after @code{#@}}.\n\
59e5f8e1d516 Fix block comment Texinfo not appearing in documentation
Rik <octave@nomad.inbox5.com>
parents: 13749
diff changeset
180 It is possible to nest block comments.\n\
14766
877263efaacc doc: Fix bug with Texinfo special characters within Seealso macro.
Rik <octave@nomad.inbox5.com>
parents: 14618
diff changeset
181 @seealso{%@\\}, #@\\{, #}\n\
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
182 @end deftypefn"),
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
183
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
184 pair_type ("%}",
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
185 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
186 @deftypefn {Operator} {} %@}\n\
13773
59e5f8e1d516 Fix block comment Texinfo not appearing in documentation
Rik <octave@nomad.inbox5.com>
parents: 13749
diff changeset
187 Close block comment. There must be nothing else, other than\n\
59e5f8e1d516 Fix block comment Texinfo not appearing in documentation
Rik <octave@nomad.inbox5.com>
parents: 13749
diff changeset
188 whitespace, in the line both before and after @code{%@}}.\n\
59e5f8e1d516 Fix block comment Texinfo not appearing in documentation
Rik <octave@nomad.inbox5.com>
parents: 13749
diff changeset
189 It is possible to nest block comments.\n\
14766
877263efaacc doc: Fix bug with Texinfo special characters within Seealso macro.
Rik <octave@nomad.inbox5.com>
parents: 14618
diff changeset
190 @seealso{#@\\}, %@\\{, %}\n\
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
191 @end deftypefn"),
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
192
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
193 pair_type ("...",
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
194 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
195 @deftypefn {Operator} {} ...\n\
13773
59e5f8e1d516 Fix block comment Texinfo not appearing in documentation
Rik <octave@nomad.inbox5.com>
parents: 13749
diff changeset
196 Continuation marker. Joins current line with following line.\n\
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
197 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
198
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
199 pair_type ("&",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
200 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
201 @deftypefn {Operator} {} &\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
202 Element by element logical 'and' operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
203 @seealso{&&, and}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
204 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
205
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
206 pair_type ("&&",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
207 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
208 @deftypefn {Operator} {} &&\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
209 Logical 'and' operator (with short-circuit evaluation).\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
210 @seealso{&, and}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
211 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
212
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
213 pair_type ("'",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
214 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
215 @deftypefn {Operator} {} '\n\
13773
59e5f8e1d516 Fix block comment Texinfo not appearing in documentation
Rik <octave@nomad.inbox5.com>
parents: 13749
diff changeset
216 Matrix transpose operator. For complex matrices, computes the\n\
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
217 complex conjugate (Hermitian) transpose.\n\
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
218 \n\
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
219 The single quote character may also be used to delimit strings, but\n\
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
220 it is better to use the double quote character, since that is never\n\
13773
59e5f8e1d516 Fix block comment Texinfo not appearing in documentation
Rik <octave@nomad.inbox5.com>
parents: 13749
diff changeset
221 ambiguous.\n\
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
222 @seealso{.', transpose}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
223 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
224
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
225 pair_type ("(",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
226 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
227 @deftypefn {Operator} {} (\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
228 Array index or function argument delimiter.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
229 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
230
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
231 pair_type (")",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
232 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
233 @deftypefn {Operator} {} )\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
234 Array index or function argument delimiter.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
235 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
236
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
237 pair_type ("*",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
238 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
239 @deftypefn {Operator} {} *\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
240 Multiplication operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
241 @seealso{.*, times}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
242 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
243
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
244 pair_type ("**",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
245 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
246 @deftypefn {Operator} {} **\n\
14171
2ced2f59f523 doc: miscellaneous documentation improvements
Rik <octave@nomad.inbox5.com>
parents: 14169
diff changeset
247 Power operator. This may return complex results for real inputs. Use\n\
14169
c0ca47ab7641 doc: Better explain which complex result is chosen by .^
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 14138
diff changeset
248 @code{realsqrt}, @code{cbrt}, @code{nthroot}, or @code{realroot} to obtain\n\
c0ca47ab7641 doc: Better explain which complex result is chosen by .^
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 14138
diff changeset
249 real results when possible.\n\
c0ca47ab7641 doc: Better explain which complex result is chosen by .^
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 14138
diff changeset
250 @seealso{power, ^, .**, .^, realpow, realsqrt, cbrt, nthroot}\n\
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
251 @end deftypefn"),
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
252
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
253 pair_type ("^",
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
254 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
255 @deftypefn {Operator} {} ^\n\
14171
2ced2f59f523 doc: miscellaneous documentation improvements
Rik <octave@nomad.inbox5.com>
parents: 14169
diff changeset
256 Power operator. This may return complex results for real inputs. Use\n\
14169
c0ca47ab7641 doc: Better explain which complex result is chosen by .^
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 14138
diff changeset
257 @code{realsqrt}, @code{cbrt}, @code{nthroot}, or @code{realroot} to obtain\n\
c0ca47ab7641 doc: Better explain which complex result is chosen by .^
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 14138
diff changeset
258 real results when possible.\n\
c0ca47ab7641 doc: Better explain which complex result is chosen by .^
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 14138
diff changeset
259 @seealso{power, **, .^, .**, realpow, realsqrt, cbrt, nthroot}\n\
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
260 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
261
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
262 pair_type ("+",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
263 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
264 @deftypefn {Operator} {} +\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
265 Addition operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
266 @seealso{plus}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
267 @end deftypefn"),
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
268
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
269 pair_type ("++",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
270 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
271 @deftypefn {Operator} {} ++\n\
13773
59e5f8e1d516 Fix block comment Texinfo not appearing in documentation
Rik <octave@nomad.inbox5.com>
parents: 13749
diff changeset
272 Increment operator. As in C, may be applied as a prefix or postfix\n\
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
273 operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
274 @seealso{--}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
275 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
276
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
277 pair_type (",",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
278 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
279 @deftypefn {Operator} {} ,\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
280 Array index, function argument, or command separator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
281 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
282
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
283 pair_type ("-",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
284 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
285 @deftypefn {Operator} {} -\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
286 Subtraction or unary negation operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
287 @seealso{minus}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
288 @end deftypefn"),
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
289
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
290 pair_type ("--",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
291 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
292 @deftypefn {Operator} {} --\n\
13773
59e5f8e1d516 Fix block comment Texinfo not appearing in documentation
Rik <octave@nomad.inbox5.com>
parents: 13749
diff changeset
293 Decrement operator. As in C, may be applied as a prefix or postfix\n\
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
294 operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
295 @seealso{++}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
296 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
297
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
298 pair_type (".'",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
299 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
300 @deftypefn {Operator} {} .'\n\
13773
59e5f8e1d516 Fix block comment Texinfo not appearing in documentation
Rik <octave@nomad.inbox5.com>
parents: 13749
diff changeset
301 Matrix transpose operator. For complex matrices, computes the\n\
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
302 transpose, @emph{not} the complex conjugate transpose.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
303 @seealso{', transpose}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
304 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
305
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
306 pair_type (".*",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
307 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
308 @deftypefn {Operator} {} .*\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
309 Element by element multiplication operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
310 @seealso{*, times}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
311 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
312
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
313 pair_type (".**",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
314 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
315 @deftypefn {Operator} {} .*\n\
14171
2ced2f59f523 doc: miscellaneous documentation improvements
Rik <octave@nomad.inbox5.com>
parents: 14169
diff changeset
316 Element by element power operator. If several complex results are possible,\n\
2ced2f59f523 doc: miscellaneous documentation improvements
Rik <octave@nomad.inbox5.com>
parents: 14169
diff changeset
317 returns the one with smallest non-negative argument (angle). Use\n\
14169
c0ca47ab7641 doc: Better explain which complex result is chosen by .^
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 14138
diff changeset
318 @code{realpow}, @code{realsqrt}, @code{cbrt}, or @code{nthroot} if a\n\
c0ca47ab7641 doc: Better explain which complex result is chosen by .^
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 14138
diff changeset
319 real result is preferred.\n\
c0ca47ab7641 doc: Better explain which complex result is chosen by .^
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 14138
diff changeset
320 @seealso{**, ^, .^, power, realpow, realsqrt, cbrt, nthroot}\n\
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
321 @end deftypefn"),
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
322
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
323 pair_type (".^",
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
324 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
325 @deftypefn {Operator} {} .^\n\
14171
2ced2f59f523 doc: miscellaneous documentation improvements
Rik <octave@nomad.inbox5.com>
parents: 14169
diff changeset
326 Element by element power operator. If several complex results are possible,\n\
2ced2f59f523 doc: miscellaneous documentation improvements
Rik <octave@nomad.inbox5.com>
parents: 14169
diff changeset
327 returns the one with smallest non-negative argument (angle). Use\n\
14169
c0ca47ab7641 doc: Better explain which complex result is chosen by .^
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 14138
diff changeset
328 @code{realpow}, @code{realsqrt}, @code{cbrt}, or @code{nthroot} if a\n\
c0ca47ab7641 doc: Better explain which complex result is chosen by .^
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 14138
diff changeset
329 real result is preferred.\n\
c0ca47ab7641 doc: Better explain which complex result is chosen by .^
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 14138
diff changeset
330 @seealso{.**, ^, **, power, realpow, realsqrt, cbrt, nthroot}\n\
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
331 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
332
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
333 pair_type ("./",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
334 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
335 @deftypefn {Operator} {} ./\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
336 Element by element right division operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
337 @seealso{/, .\\, rdivide, mrdivide}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
338 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
339
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
340 pair_type ("/",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
341 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
342 @deftypefn {Operator} {} /\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
343 Right division operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
344 @seealso{./, \\, rdivide, mrdivide}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
345 @end deftypefn"),
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
346
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
347 pair_type (".\\",
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
348 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
349 @deftypefn {Operator} {} .\\\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
350 Element by element left division operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
351 @seealso{\\, ./, rdivide, mrdivide}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
352 @end deftypefn"),
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
353
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
354 pair_type ("\\",
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
355 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
356 @deftypefn {Operator} {} \\\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
357 Left division operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
358 @seealso{.\\, /, ldivide, mldivide}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
359 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
360
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
361 pair_type (":",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
362 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
363 @deftypefn {Operator} {} :\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
364 Select entire rows or columns of matrices.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
365 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
366
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
367 pair_type (";",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
368 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
369 @deftypefn {Operator} {} ;\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
370 Array row or command separator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
371 @seealso{,}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
372 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
373
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
374 pair_type ("<",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
375 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
376 @deftypefn {Operator} {} <\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
377 'Less than' operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
378 @seealso{lt}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
379 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
380
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
381 pair_type ("<=",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
382 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
383 @deftypefn {Operator} {} <=\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
384 'Less than' or 'equals' operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
385 @seealso{le}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
386 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
387
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
388 pair_type ("=",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
389 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
390 @deftypefn {Operator} {} =\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
391 Assignment operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
392 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
393
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
394 pair_type ("==",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
395 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
396 @deftypefn {Operator} {} ==\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
397 Equality test operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
398 @seealso{eq}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
399 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
400
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
401 pair_type (">",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
402 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
403 @deftypefn {Operator} {} >\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
404 'Greater than' operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
405 @seealso{gt}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
406 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
407
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
408 pair_type (">=",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
409 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
410 @deftypefn {Operator} {} >=\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
411 'Greater than' or 'equals' operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
412 @seealso{ge}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
413 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
414
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
415 pair_type ("[",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
416 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
417 @deftypefn {Operator} {} [\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
418 Return list delimiter.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
419 @seealso{]}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
420 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
421
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
422 pair_type ("]",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
423 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
424 @deftypefn {Operator} {} ]\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
425 Return list delimiter.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
426 @seealso{[}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
427 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
428
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
429 pair_type ("|",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
430 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
431 @deftypefn {Operator} {} |\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
432 Element by element logical 'or' operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
433 @seealso{||, or}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
434 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
435
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
436 pair_type ("||",
12670
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
437 "-*- texinfo -*-\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
438 @deftypefn {Operator} {} ||\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
439 Logical 'or' (with short-circuit evaluation) operator.\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
440 @seealso{|, or}\n\
f83ec5ab90ad doc: Use texinfo for help text of operators.
Carnë Draug <carandraug+dev@gmail.com>
parents: 12605
diff changeset
441 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
442 };
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
443
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
444 const static pair_type keywords[] =
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
445 {
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
446 pair_type ("break",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
447 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
448 @deftypefn {Keyword} {} break\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
449 Exit the innermost enclosing do, while or for loop.\n\
13246
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
450 @seealso{do, while, for, parfor, continue}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
451 @end deftypefn"),
5040
b6ff3a0d3d17 [project @ 2004-09-27 13:50:01 by jwe]
jwe
parents: 4686
diff changeset
452
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
453 pair_type ("case",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
454 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
455 @deftypefn {Keyword} {} case @{@var{value}@}\n\
9064
7c02ec148a3c Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
456 A case statement in an switch. Octave cases are exclusive and do not\n\
7c02ec148a3c Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
457 fall-through as do C-language cases. A switch statement must have at least\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
458 one case. See @code{switch} for an example.\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
459 @seealso{switch}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
460 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
461
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
462 pair_type ("catch",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
463 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
464 @deftypefn {Keyword} {} catch\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
465 Begin the cleanup part of a try-catch block.\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
466 @seealso{try}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
467 @end deftypefn"),
1489
3e705c864019 [project @ 1995-09-28 05:38:26 by jwe]
jwe
parents: 1488
diff changeset
468
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
469 pair_type ("continue",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
470 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
471 @deftypefn {Keyword} {} continue\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
472 Jump to the end of the innermost enclosing do, while or for loop.\n\
13246
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
473 @seealso{do, while, for, parfor, break}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
474 @end deftypefn"),
5040
b6ff3a0d3d17 [project @ 2004-09-27 13:50:01 by jwe]
jwe
parents: 4686
diff changeset
475
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
476 pair_type ("do",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
477 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
478 @deftypefn {Keyword} {} do\n\
9064
7c02ec148a3c Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
479 Begin a do-until loop. This differs from a do-while loop in that the\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
480 body of the loop is executed at least once.\n\
15908
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
481 \n\
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
482 @example\n\
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
483 @group\n\
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
484 i = 0;\n\
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
485 do\n\
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
486 i++\n\
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
487 until (i == 10)\n\
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
488 @end group\n\
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
489 @end example\n\
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
490 @seealso{for, until, while}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
491 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
492
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
493 pair_type ("else",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
494 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
495 @deftypefn {Keyword} {} else\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
496 Alternate action for an if block. See @code{if} for an example.\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
497 @seealso{if}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
498 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
499
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
500 pair_type ("elseif",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
501 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
502 @deftypefn {Keyword} {} elseif (@var{condition})\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
503 Alternate conditional test for an if block. See @code{if} for an example.\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
504 @seealso{if}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
505 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
506
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
507 pair_type ("end",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
508 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
509 @deftypefn {Keyword} {} end\n\
10840
89f4d7e294cc Grammarcheck .cc files
Rik <octave@nomad.inbox5.com>
parents: 10500
diff changeset
510 Mark the end of any @code{for}, @code{if}, @code{do}, @code{while}, or\n\
89f4d7e294cc Grammarcheck .cc files
Rik <octave@nomad.inbox5.com>
parents: 10500
diff changeset
511 @code{function} block.\n\
13246
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
512 @seealso{for, parfor, if, do, while, function}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
513 @end deftypefn"),
928
2f91e7098f8c [project @ 1994-11-15 21:53:40 by jwe]
jwe
parents: 867
diff changeset
514
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
515 pair_type ("end_try_catch",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
516 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
517 @deftypefn {Keyword} {} end_try_catch\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
518 Mark the end of an @code{try-catch} block.\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
519 @seealso{try, catch}\n\
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11572
diff changeset
520 @end deftypefn"),
1489
3e705c864019 [project @ 1995-09-28 05:38:26 by jwe]
jwe
parents: 1488
diff changeset
521
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
522 pair_type ("end_unwind_protect",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
523 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
524 @deftypefn {Keyword} {} end_unwind_protect\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
525 Mark the end of an unwind_protect block.\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
526 @seealso{unwind_protect}\n\
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11572
diff changeset
527 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
528
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
529 pair_type ("endfor",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
530 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
531 @deftypefn {Keyword} {} endfor\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
532 Mark the end of a for loop. See @code{for} for an example.\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
533 @seealso{for}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
534 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
535
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
536 pair_type ("endfunction",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
537 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
538 @deftypefn {Keyword} {} endfunction\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
539 Mark the end of a function.\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
540 @seealso{function}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
541 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
542
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
543 pair_type ("endif",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
544 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
545 @deftypefn {Keyword} {} endif\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
546 Mark the end of an if block. See @code{if} for an example.\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
547 @seealso{if}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
548 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
549
13246
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
550 pair_type ("endparfor",
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
551 "-*- texinfo -*-\n\
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
552 @deftypefn {Keyword} {} endparfor\n\
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
553 Mark the end of a parfor loop. See @code{parfor} for an example.\n\
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
554 @seealso{parfor}\n\
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
555 @end deftypefn"),
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
556
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
557 pair_type ("endswitch",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
558 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
559 @deftypefn {Keyword} {} endswitch\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
560 Mark the end of a switch block. See @code{switch} for an example.\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
561 @seealso{switch}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
562 @end deftypefn"),
5122
695509577dc6 [project @ 2005-01-26 22:15:11 by jwe]
jwe
parents: 5041
diff changeset
563
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
564 pair_type ("endwhile",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
565 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
566 @deftypefn {Keyword} {} endwhile\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
567 Mark the end of a while loop. See @code{while} for an example.\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
568 @seealso{do, while}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
569 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
570
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
571 pair_type ("for",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
572 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
573 @deftypefn {Keyword} {} for @var{i} = @var{range}\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
574 Begin a for loop.\n\
10840
89f4d7e294cc Grammarcheck .cc files
Rik <octave@nomad.inbox5.com>
parents: 10500
diff changeset
575 \n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
576 @example\n\
9064
7c02ec148a3c Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
577 @group\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
578 for i = 1:10\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
579 i\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
580 endfor\n\
9064
7c02ec148a3c Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
581 @end group\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
582 @end example\n\
13246
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
583 @seealso{do, parfor, while}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
584 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
585
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
586 pair_type ("function",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
587 "-*- texinfo -*-\n\
12605
307e177dbaa8 doc: Add spaces after commas in @seealso blocks.
Rik <octave@nomad.inbox5.com>
parents: 12519
diff changeset
588 @deftypefn {Keyword} {} function @var{outputs} = function (@var{input}, @dots{})\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
589 @deftypefnx {Keyword} {} function {} function (@var{input}, @dots{})\n\
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
590 @deftypefnx {Keyword} {} function @var{outputs} = function\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
591 Begin a function body with @var{outputs} as results and @var{inputs} as\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
592 parameters.\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
593 @seealso{return}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
594 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
595
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
596 pair_type ("global",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
597 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
598 @deftypefn {Keyword} {} global\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
599 Declare variables to have global scope.\n\
10840
89f4d7e294cc Grammarcheck .cc files
Rik <octave@nomad.inbox5.com>
parents: 10500
diff changeset
600 \n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
601 @example\n\
9064
7c02ec148a3c Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
602 @group\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
603 global @var{x};\n\
14360
97883071e8e4 doc: Correct off-by-1 spacings in all .cc docstrings
Rik <octave@nomad.inbox5.com>
parents: 14171
diff changeset
604 if (isempty (@var{x}))\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
605 x = 1;\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
606 endif\n\
9064
7c02ec148a3c Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
607 @end group\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
608 @end example\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
609 @seealso{persistent}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
610 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
611
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
612 pair_type ("if",
5393
c8783205a7c6 [project @ 2005-06-15 17:03:54 by jwe]
jwe
parents: 5339
diff changeset
613 "-*- texinfo -*-\n\
12605
307e177dbaa8 doc: Add spaces after commas in @seealso blocks.
Rik <octave@nomad.inbox5.com>
parents: 12519
diff changeset
614 @deftypefn {Keyword} {} if (@var{cond}) @dots{} endif\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
615 @deftypefnx {Keyword} {} if (@var{cond}) @dots{} else @dots{} endif\n\
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
616 @deftypefnx {Keyword} {} if (@var{cond}) @dots{} elseif (@var{cond}) @dots{} endif\n\
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
617 @deftypefnx {Keyword} {} if (@var{cond}) @dots{} elseif (@var{cond}) @dots{} else @dots{} endif\n\
5393
c8783205a7c6 [project @ 2005-06-15 17:03:54 by jwe]
jwe
parents: 5339
diff changeset
618 Begin an if block.\n\
10840
89f4d7e294cc Grammarcheck .cc files
Rik <octave@nomad.inbox5.com>
parents: 10500
diff changeset
619 \n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
620 @example\n\
9064
7c02ec148a3c Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
621 @group\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
622 x = 1;\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
623 if (x == 1)\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
624 disp (\"one\");\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
625 elseif (x == 2)\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
626 disp (\"two\");\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
627 else\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
628 disp (\"not one or two\");\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
629 endif\n\
9064
7c02ec148a3c Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
630 @end group\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
631 @end example\n\
5646
2b20d1707f29 [project @ 2006-03-06 22:38:32 by jwe]
jwe
parents: 5644
diff changeset
632 @seealso{switch}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
633 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
634
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
635 pair_type ("otherwise",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
636 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
637 @deftypefn {Keyword} {} otherwise\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
638 The default statement in a switch block (similar to else in an if block).\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
639 @seealso{switch}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
640 @end deftypefn"),
5040
b6ff3a0d3d17 [project @ 2004-09-27 13:50:01 by jwe]
jwe
parents: 4686
diff changeset
641
13246
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
642 pair_type ("parfor",
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
643 "-*- texinfo -*-\n\
17311
56404cdcb723 Correct parfor keyword documentation and add some %!tests.
Rik <rik@octave.org>
parents: 17281
diff changeset
644 @deftypefn {Keyword} {} parfor @var{i} = @var{range}\n\
56404cdcb723 Correct parfor keyword documentation and add some %!tests.
Rik <rik@octave.org>
parents: 17281
diff changeset
645 @deftypefnx {Keyword} {} parfor (@var{i} = @var{range}, @var{maxproc})\n\
13246
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
646 Begin a for loop that may execute in parallel.\n\
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
647 \n\
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
648 @example\n\
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
649 @group\n\
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
650 parfor i = 1:10\n\
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
651 i\n\
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
652 endparfor\n\
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
653 @end group\n\
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
654 @end example\n\
13773
59e5f8e1d516 Fix block comment Texinfo not appearing in documentation
Rik <octave@nomad.inbox5.com>
parents: 13749
diff changeset
655 @seealso{for, do, while}\n\
13246
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
656 @end deftypefn"),
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 12911
diff changeset
657
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
658 pair_type ("persistent",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
659 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
660 @deftypefn {Keyword} {} persistent @var{var}\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
661 Declare variables as persistent. A variable that has been declared\n\
5623
691de3e3c2f8 [project @ 2006-02-15 18:32:32 by jwe]
jwe
parents: 5594
diff changeset
662 persistent within a function will retain its contents in memory between\n\
691de3e3c2f8 [project @ 2006-02-15 18:32:32 by jwe]
jwe
parents: 5594
diff changeset
663 subsequent calls to the same function. The difference between persistent\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
664 variables and global variables is that persistent variables are local in \n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
665 scope to a particular function and are not visible elsewhere.\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
666 @seealso{global}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
667 @end deftypefn"),
4686
c7ae43dfdea4 [project @ 2004-01-06 19:29:23 by jwe]
jwe
parents: 4469
diff changeset
668
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
669 pair_type ("return",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
670 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
671 @deftypefn {Keyword} {} return\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
672 Return from a function.\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
673 @seealso{function}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
674 @end deftypefn"),
928
2f91e7098f8c [project @ 1994-11-15 21:53:40 by jwe]
jwe
parents: 867
diff changeset
675
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
676 pair_type ("static",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
677 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
678 @deftypefn {Keyword} {} static\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
679 This function has been deprecated in favor of persistent.\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
680 @seealso{persistent}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
681 @end deftypefn"),
5040
b6ff3a0d3d17 [project @ 2004-09-27 13:50:01 by jwe]
jwe
parents: 4686
diff changeset
682
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
683 pair_type ("switch",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
684 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
685 @deftypefn {Keyword} {} switch @var{statement}\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
686 Begin a switch block.\n\
10840
89f4d7e294cc Grammarcheck .cc files
Rik <octave@nomad.inbox5.com>
parents: 10500
diff changeset
687 \n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
688 @example\n\
9064
7c02ec148a3c Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
689 @group\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
690 yesno = \"yes\"\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
691 \n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
692 switch yesno\n\
5832
5e41e06f6a78 [project @ 2006-05-26 21:41:32 by jwe]
jwe
parents: 5823
diff changeset
693 case @{\"Yes\" \"yes\" \"YES\" \"y\" \"Y\"@}\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
694 value = 1;\n\
5832
5e41e06f6a78 [project @ 2006-05-26 21:41:32 by jwe]
jwe
parents: 5823
diff changeset
695 case @{\"No\" \"no\" \"NO\" \"n\" \"N\"@}\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
696 value = 0;\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
697 otherwise\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
698 error (\"invalid value\");\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
699 endswitch\n\
9064
7c02ec148a3c Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
700 @end group\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
701 @end example\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
702 @seealso{if, case, otherwise}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
703 @end deftypefn"),
5040
b6ff3a0d3d17 [project @ 2004-09-27 13:50:01 by jwe]
jwe
parents: 4686
diff changeset
704
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
705 pair_type ("try",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
706 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
707 @deftypefn {Keyword} {} try\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
708 Begin a try-catch block.\n\
6138
c5874b47d571 [project @ 2006-11-03 18:26:11 by jwe]
jwe
parents: 6099
diff changeset
709 \n\
c5874b47d571 [project @ 2006-11-03 18:26:11 by jwe]
jwe
parents: 6099
diff changeset
710 If an error occurs within a try block, then the catch code will be run and\n\
c5874b47d571 [project @ 2006-11-03 18:26:11 by jwe]
jwe
parents: 6099
diff changeset
711 execution will proceed after the catch block (though it is often\n\
c5874b47d571 [project @ 2006-11-03 18:26:11 by jwe]
jwe
parents: 6099
diff changeset
712 recommended to use the lasterr function to re-throw the error after cleanup\n\
c5874b47d571 [project @ 2006-11-03 18:26:11 by jwe]
jwe
parents: 6099
diff changeset
713 is completed).\n\
12605
307e177dbaa8 doc: Add spaces after commas in @seealso blocks.
Rik <octave@nomad.inbox5.com>
parents: 12519
diff changeset
714 @seealso{catch, unwind_protect}\n\
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11572
diff changeset
715 @end deftypefn"),
1489
3e705c864019 [project @ 1995-09-28 05:38:26 by jwe]
jwe
parents: 1488
diff changeset
716
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
717 pair_type ("until",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
718 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
719 @deftypefn {Keyword} {} until\n\
15908
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
720 End a do-until loop. See @code{do} for an example.\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
721 @seealso{do}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
722 @end deftypefn"),
5040
b6ff3a0d3d17 [project @ 2004-09-27 13:50:01 by jwe]
jwe
parents: 4686
diff changeset
723
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
724 pair_type ("unwind_protect",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
725 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
726 @deftypefn {Keyword} {} unwind_protect\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
727 Begin an unwind_protect block.\n\
6138
c5874b47d571 [project @ 2006-11-03 18:26:11 by jwe]
jwe
parents: 6099
diff changeset
728 \n\
c5874b47d571 [project @ 2006-11-03 18:26:11 by jwe]
jwe
parents: 6099
diff changeset
729 If an error occurs within the first part of an unwind_protect block\n\
c5874b47d571 [project @ 2006-11-03 18:26:11 by jwe]
jwe
parents: 6099
diff changeset
730 the commands within the unwind_protect_cleanup block are executed before\n\
c5874b47d571 [project @ 2006-11-03 18:26:11 by jwe]
jwe
parents: 6099
diff changeset
731 the error is thrown. If an error is not thrown, then the\n\
c5874b47d571 [project @ 2006-11-03 18:26:11 by jwe]
jwe
parents: 6099
diff changeset
732 unwind_protect_cleanup block is still executed (in other words, the\n\
c5874b47d571 [project @ 2006-11-03 18:26:11 by jwe]
jwe
parents: 6099
diff changeset
733 unwind_protect_cleanup will be run with or without an error in the\n\
c5874b47d571 [project @ 2006-11-03 18:26:11 by jwe]
jwe
parents: 6099
diff changeset
734 unwind_protect block).\n\
12605
307e177dbaa8 doc: Add spaces after commas in @seealso blocks.
Rik <octave@nomad.inbox5.com>
parents: 12519
diff changeset
735 @seealso{unwind_protect_cleanup, try}\n\
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11572
diff changeset
736 @end deftypefn"),
928
2f91e7098f8c [project @ 1994-11-15 21:53:40 by jwe]
jwe
parents: 867
diff changeset
737
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
738 pair_type ("unwind_protect_cleanup",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
739 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
740 @deftypefn {Keyword} {} unwind_protect_cleanup\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
741 Begin the cleanup section of an unwind_protect block.\n\
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
742 @seealso{unwind_protect}\n\
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11572
diff changeset
743 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
744
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
745 pair_type ("varargin",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
746 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
747 @deftypefn {Keyword} {} varargin\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
748 Pass an arbitrary number of arguments into a function.\n\
13749
62d1f56b0be7 New nthargout function
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 13246
diff changeset
749 @seealso{varargout, nargin, isargout, nargout, nthargout}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
750 @end deftypefn"),
5040
b6ff3a0d3d17 [project @ 2004-09-27 13:50:01 by jwe]
jwe
parents: 4686
diff changeset
751
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
752 pair_type ("varargout",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
753 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
754 @deftypefn {Keyword} {} varargout\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
755 Pass an arbitrary number of arguments out of a function.\n\
13749
62d1f56b0be7 New nthargout function
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 13246
diff changeset
756 @seealso{varargin, nargin, isargout, nargout, nthargout}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
757 @end deftypefn"),
5040
b6ff3a0d3d17 [project @ 2004-09-27 13:50:01 by jwe]
jwe
parents: 4686
diff changeset
758
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
759 pair_type ("while",
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
760 "-*- texinfo -*-\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
761 @deftypefn {Keyword} {} while\n\
5818
66a426e608cc [project @ 2006-05-17 16:45:41 by jwe]
jwe
parents: 5814
diff changeset
762 Begin a while loop.\n\
15908
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
763 \n\
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
764 @example\n\
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
765 @group\n\
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
766 i = 0;\n\
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
767 while (i < 10)\n\
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
768 i++\n\
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
769 endwhile\n\
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
770 @end group\n\
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
771 @end example\n\
5a4a07a2ec73 doc: add while and do-until example to help text (bug #7915)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15489
diff changeset
772 @seealso{do, endwhile, for, until}\n\
11547
e1851653d59c Eliminate @deffn macros.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
773 @end deftypefn"),
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
774 };
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
775
581
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 572
diff changeset
776 // Return a copy of the operator or keyword names.
3016
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
777 static string_vector
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
778 names (const map_type& lst)
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
779 {
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
780 string_vector retval (lst.size ());
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
781 int j = 0;
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
782 for (map_iter iter = lst.begin (); iter != lst.end (); iter ++)
15020
560317fd5977 maint: Cuddle open bracket used for indexing C++ arrays in source code.
Rik <rik@octave.org>
parents: 15005
diff changeset
783 retval[j++] = iter->first;
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
784 return retval;
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
785 }
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
786
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
787 const static map_type operators_map (operators, operators + size (operators));
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
788 const static map_type keywords_map (keywords, keywords + size (keywords));
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
789 const static string_vector keyword_names = names (keywords_map);
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
790
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
791 // FIXME: It's not likely that this does the right thing now.
3016
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
792
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
793 string_vector
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
794 make_name_list (void)
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
795 {
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
796 const int key_len = keyword_names.length ();
3016
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
797
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
798 const string_vector bif = symbol_table::built_in_function_names ();
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
799 const int bif_len = bif.length ();
4009
27e461aed956 [project @ 2002-07-31 09:33:03 by jwe]
jwe
parents: 3917
diff changeset
800
12911
d6151d774283 make completion work for command-line functions
John W. Eaton <jwe@octave.org>
parents: 12670
diff changeset
801 const string_vector cfl = symbol_table::cmdline_function_names ();
d6151d774283 make completion work for command-line functions
John W. Eaton <jwe@octave.org>
parents: 12670
diff changeset
802 const int cfl_len = cfl.length ();
d6151d774283 make completion work for command-line functions
John W. Eaton <jwe@octave.org>
parents: 12670
diff changeset
803
10500
8f27f368aba2 fix generating names for TAB completion
Jaroslav Hajek <highegg@gmail.com>
parents: 10315
diff changeset
804 const string_vector lcl = symbol_table::variable_names ();
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
805 const int lcl_len = lcl.length ();
3016
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
806
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
807 const string_vector ffl = load_path::fcn_names ();
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
808 const int ffl_len = ffl.length ();
3016
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
809
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
810 const string_vector afl = autoloaded_functions ();
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
811 const int afl_len = afl.length ();
5592
61d6cebd243b [project @ 2006-01-12 17:55:22 by dbateman]
dbateman
parents: 5576
diff changeset
812
12911
d6151d774283 make completion work for command-line functions
John W. Eaton <jwe@octave.org>
parents: 12670
diff changeset
813 const int total_len
d6151d774283 make completion work for command-line functions
John W. Eaton <jwe@octave.org>
parents: 12670
diff changeset
814 = key_len + bif_len + cfl_len + lcl_len + ffl_len + afl_len;
3016
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
815
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
816 string_vector list (total_len);
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
817
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
818 // Put all the symbols in one big list.
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
819
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
820 int j = 0;
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
821 int i = 0;
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
822 for (i = 0; i < key_len; i++)
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
823 list[j++] = keyword_names[i];
3016
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
824
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7272
diff changeset
825 for (i = 0; i < bif_len; i++)
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7272
diff changeset
826 list[j++] = bif[i];
4009
27e461aed956 [project @ 2002-07-31 09:33:03 by jwe]
jwe
parents: 3917
diff changeset
827
12911
d6151d774283 make completion work for command-line functions
John W. Eaton <jwe@octave.org>
parents: 12670
diff changeset
828 for (i = 0; i < cfl_len; i++)
d6151d774283 make completion work for command-line functions
John W. Eaton <jwe@octave.org>
parents: 12670
diff changeset
829 list[j++] = cfl[i];
d6151d774283 make completion work for command-line functions
John W. Eaton <jwe@octave.org>
parents: 12670
diff changeset
830
3016
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
831 for (i = 0; i < lcl_len; i++)
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
832 list[j++] = lcl[i];
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
833
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
834 for (i = 0; i < ffl_len; i++)
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
835 list[j++] = ffl[i];
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
836
5592
61d6cebd243b [project @ 2006-01-12 17:55:22 by dbateman]
dbateman
parents: 5576
diff changeset
837 for (i = 0; i < afl_len; i++)
61d6cebd243b [project @ 2006-01-12 17:55:22 by dbateman]
dbateman
parents: 5576
diff changeset
838 list[j++] = afl[i];
61d6cebd243b [project @ 2006-01-12 17:55:22 by dbateman]
dbateman
parents: 5576
diff changeset
839
3016
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
840 return list;
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
841 }
f512c16826d1 [project @ 1997-06-03 03:16:13 by jwe]
jwe
parents: 3014
diff changeset
842
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
843 static bool
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
844 looks_like_html (const std::string& msg)
3014
38de16594cb4 [project @ 1997-06-02 20:28:09 by jwe]
jwe
parents: 3013
diff changeset
845 {
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
846 const size_t p1 = msg.find ('\n');
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
847 std::string t = msg.substr (0, p1);
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
848 // FIXME: this comparison should be case-insensitive
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
849 const size_t p2 = t.find ("<html");
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11572
diff changeset
850
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
851 return (p2 != std::string::npos);
2470
1e673f0648b5 [project @ 1996-11-05 21:46:06 by jwe]
jwe
parents: 2442
diff changeset
852 }
3014
38de16594cb4 [project @ 1997-06-02 20:28:09 by jwe]
jwe
parents: 3013
diff changeset
853
38de16594cb4 [project @ 1997-06-02 20:28:09 by jwe]
jwe
parents: 3013
diff changeset
854 static bool
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3503
diff changeset
855 looks_like_texinfo (const std::string& msg, size_t& p1)
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3259
diff changeset
856 {
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3259
diff changeset
857 p1 = msg.find ('\n');
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3259
diff changeset
858
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3503
diff changeset
859 std::string t = msg.substr (0, p1);
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3259
diff changeset
860
8021
85184151822e fix typo in NPOS change
John W. Eaton <jwe@octave.org>
parents: 8019
diff changeset
861 if (p1 == std::string::npos)
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3259
diff changeset
862 p1 = 0;
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3259
diff changeset
863
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3259
diff changeset
864 size_t p2 = t.find ("-*- texinfo -*-");
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3259
diff changeset
865
8021
85184151822e fix typo in NPOS change
John W. Eaton <jwe@octave.org>
parents: 8019
diff changeset
866 return (p2 != std::string::npos);
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3259
diff changeset
867 }
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3259
diff changeset
868
3355
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
869 static bool
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11572
diff changeset
870 raw_help_from_symbol_table (const std::string& nm, std::string& h,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
871 std::string& w, bool& symbol_found)
3355
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
872 {
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
873 bool retval = false;
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
874
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7272
diff changeset
875 octave_value val = symbol_table::find_function (nm);
3355
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
876
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7272
diff changeset
877 if (val.is_defined ())
3355
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
878 {
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7272
diff changeset
879 octave_function *fcn = val.function_value ();
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7272
diff changeset
880
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7272
diff changeset
881 if (fcn)
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
882 {
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
883 symbol_found = true;
5399
db34dff19947 [project @ 2005-06-17 21:16:20 by jwe]
jwe
parents: 5393
diff changeset
884
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
885 h = fcn->doc_string ();
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7272
diff changeset
886
8631
52956d669506 Display sensible error message when the help text of an undocumented function is requested
Soren Hauberg <hauberg@gmail.com>
parents: 8630
diff changeset
887 retval = true;
52956d669506 Display sensible error message when the help text of an undocumented function is requested
Soren Hauberg <hauberg@gmail.com>
parents: 8630
diff changeset
888
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
889 w = fcn->fcn_file_name ();
6243
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
890
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
891 if (w.empty ())
8631
52956d669506 Display sensible error message when the help text of an undocumented function is requested
Soren Hauberg <hauberg@gmail.com>
parents: 8630
diff changeset
892 w = fcn->is_user_function ()
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
893 ? "command-line function" : "built-in function";
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
894 }
6243
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
895 }
3355
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
896
6243
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
897 return retval;
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
898 }
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
899
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
900 static bool
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11572
diff changeset
901 raw_help_from_file (const std::string& nm, std::string& h,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
902 std::string& file, bool& symbol_found)
6243
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
903 {
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
904 bool retval = false;
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
905
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
906 h = get_help_from_file (nm, symbol_found, file);
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
907
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
908 if (h.length () > 0)
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
909 retval = true;
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
910
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
911 return retval;
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
912 }
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
913
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
914 static bool
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11572
diff changeset
915 raw_help_from_map (const std::string& nm, std::string& h,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
916 const map_type& map, bool& symbol_found)
3355
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
917 {
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
918 map_iter idx = map.find (nm);
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
919 symbol_found = (idx != map.end ());
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
920 h = (symbol_found) ? idx->second : "";
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
921 return symbol_found;
3355
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
922 }
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
923
6243
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
924 std::string
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
925 raw_help (const std::string& nm, bool& symbol_found)
6243
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
926 {
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
927 std::string h;
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
928 std::string w;
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
929 std::string f;
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
930
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
931 (raw_help_from_symbol_table (nm, h, w, symbol_found)
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
932 || raw_help_from_file (nm, h, f, symbol_found)
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
933 || raw_help_from_map (nm, h, operators_map, symbol_found)
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
934 || raw_help_from_map (nm, h, keywords_map, symbol_found));
6243
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
935
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
936 return h;
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
937 }
7924a9086c08 [project @ 2007-01-17 21:47:50 by jwe]
jwe
parents: 6138
diff changeset
938
15470
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
939 DEFUN (built_in_docstrings_file, args, nargout,
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
940 "-*- texinfo -*-\n\
15470
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
941 @deftypefn {Built-in Function} {@var{val} =} built_in_docstrings_file ()\n\
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
942 @deftypefnx {Built-in Function} {@var{old_val} =} built_in_docstrings_file (@var{new_val})\n\
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
943 @deftypefnx {Built-in Function} {} built_in_docstrings_file (@var{new_val}, \"local\")\n\
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
944 Query or set the internal variable that specifies the name of the\n\
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
945 file containing docstrings for built-in Octave functions.\n\
16807
2fd22fbaffa3 doc: Add built_in_docstrings_file() to documentation.
Rik <rik@octave.org>
parents: 16199
diff changeset
946 The default value is\n\
2fd22fbaffa3 doc: Add built_in_docstrings_file() to documentation.
Rik <rik@octave.org>
parents: 16199
diff changeset
947 @file{@var{octave-home}/share/octave/@var{version}/etc/built-in-docstrings},\n\
2fd22fbaffa3 doc: Add built_in_docstrings_file() to documentation.
Rik <rik@octave.org>
parents: 16199
diff changeset
948 in which @var{octave-home} is the root directory of the Octave installation,\n\
2fd22fbaffa3 doc: Add built_in_docstrings_file() to documentation.
Rik <rik@octave.org>
parents: 16199
diff changeset
949 and @var{version} is the Octave version number.\n\
2fd22fbaffa3 doc: Add built_in_docstrings_file() to documentation.
Rik <rik@octave.org>
parents: 16199
diff changeset
950 The default value may be overridden by the environment variable\n\
2fd22fbaffa3 doc: Add built_in_docstrings_file() to documentation.
Rik <rik@octave.org>
parents: 16199
diff changeset
951 @w{@env{OCTAVE_BUILT_IN_DOCSTRINGS_FILE}}, or the command line argument\n\
2fd22fbaffa3 doc: Add built_in_docstrings_file() to documentation.
Rik <rik@octave.org>
parents: 16199
diff changeset
952 @samp{--built-in-docstrings-file FNAME}.\n\
15470
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
953 \n\
16807
2fd22fbaffa3 doc: Add built_in_docstrings_file() to documentation.
Rik <rik@octave.org>
parents: 16199
diff changeset
954 Note: This variable is only used when Octave is initializing itself.\n\
2fd22fbaffa3 doc: Add built_in_docstrings_file() to documentation.
Rik <rik@octave.org>
parents: 16199
diff changeset
955 Modifying it during a running session of Octave will have no effect.\n\
15470
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
956 @end deftypefn")
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
957 {
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
958 return SET_NONEMPTY_INTERNAL_STRING_VARIABLE (built_in_docstrings_file);
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
959 }
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
960
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
961 void
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
962 install_built_in_docstrings (void)
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
963 {
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
964 std::string fname = Vbuilt_in_docstrings_file;
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
965
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
966 std::ifstream file (fname.c_str (), std::ios::in | std::ios::binary);
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
967
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
968 if (file)
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
969 {
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
970 // Ignore header;
17256
ee1d19174316 doc: Use 0x1d as record separator for joint compatibility with Texinfo 4.x and 5.x.
Rik <rik@octave.org>
parents: 17242
diff changeset
971 file.ignore (1000, 0x1d);
15470
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
972
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
973 if (file.gcount () == 1000)
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
974 {
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
975 // We use std::cerr here instead of calling Octave's warning
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
976 // function because install_built_in_docstrings is called
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
977 // before the interpreter is initialized, so warning messages
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
978 // won't work properly.
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
979
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
980 std::cerr << "warning: is builtin-docstrings file corrupted?"
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
981 << std::endl;
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
982 return;
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
983 }
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
984
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
985 // FIXME: eliminate fixed buffer size.
15470
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
986 size_t bufsize = 100000;
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
987
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
988 OCTAVE_LOCAL_BUFFER (char, buf, bufsize);
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
989
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
990 while (! file.eof ())
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
991 {
17256
ee1d19174316 doc: Use 0x1d as record separator for joint compatibility with Texinfo 4.x and 5.x.
Rik <rik@octave.org>
parents: 17242
diff changeset
992 file.getline (buf, bufsize, 0x1d);
15470
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
993
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
994 std::string tmp (buf);
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
995
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
996 size_t pos = tmp.find ('\n');
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
997
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
998 std::string fcn = tmp.substr (0, pos);
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
999
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1000 octave_value ov = symbol_table::find_built_in_function (fcn);
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1001
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1002 if (ov.is_defined ())
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1003 {
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1004 octave_function *fp = ov.function_value ();
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1005
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1006 if (fp)
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1007 {
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1008 tmp = tmp.substr (pos+1);
15489
720a3bd76492 Backout changeset afc002de3ade until final built-in docstrings file format chosen.
Rik <rik@octave.org>
parents: 15486
diff changeset
1009
720a3bd76492 Backout changeset afc002de3ade until final built-in docstrings file format chosen.
Rik <rik@octave.org>
parents: 15486
diff changeset
1010 // Strip @c FILENAME which is part of current DOCSTRINGS
720a3bd76492 Backout changeset afc002de3ade until final built-in docstrings file format chosen.
Rik <rik@octave.org>
parents: 15486
diff changeset
1011 // syntax. This may disappear if a specific format for
720a3bd76492 Backout changeset afc002de3ade until final built-in docstrings file format chosen.
Rik <rik@octave.org>
parents: 15486
diff changeset
1012 // docstring files is developed.
720a3bd76492 Backout changeset afc002de3ade until final built-in docstrings file format chosen.
Rik <rik@octave.org>
parents: 15486
diff changeset
1013 while (tmp.length () > 2 && tmp[0] == '@' && tmp[1] == 'c')
720a3bd76492 Backout changeset afc002de3ade until final built-in docstrings file format chosen.
Rik <rik@octave.org>
parents: 15486
diff changeset
1014 {
720a3bd76492 Backout changeset afc002de3ade until final built-in docstrings file format chosen.
Rik <rik@octave.org>
parents: 15486
diff changeset
1015 pos = tmp.find ('\n');
720a3bd76492 Backout changeset afc002de3ade until final built-in docstrings file format chosen.
Rik <rik@octave.org>
parents: 15486
diff changeset
1016 tmp = tmp.substr (pos+1);
720a3bd76492 Backout changeset afc002de3ade until final built-in docstrings file format chosen.
Rik <rik@octave.org>
parents: 15486
diff changeset
1017 }
720a3bd76492 Backout changeset afc002de3ade until final built-in docstrings file format chosen.
Rik <rik@octave.org>
parents: 15486
diff changeset
1018
15470
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1019 fp->document (tmp);
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1020 }
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1021 }
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1022 }
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1023 }
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1024 else
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1025 {
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1026 // See note above about using std::cerr instead of warning.
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1027
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1028 std::cerr << "warning: docstring file '" << fname << "' not found"
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1029 << std::endl;
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1030 }
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1031
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1032 }
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
1033
1140
26d986865487 [project @ 1995-02-26 03:23:43 by jwe]
jwe
parents: 1118
diff changeset
1034 static void
9806
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1035 do_get_help_text (const std::string& name, std::string& text,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1036 std::string& format)
1140
26d986865487 [project @ 1995-02-26 03:23:43 by jwe]
jwe
parents: 1118
diff changeset
1037 {
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1038 bool symbol_found = false;
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1039 text = raw_help (name, symbol_found);
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11572
diff changeset
1040
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1041 format = "Not found";
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1042 if (symbol_found)
1140
26d986865487 [project @ 1995-02-26 03:23:43 by jwe]
jwe
parents: 1118
diff changeset
1043 {
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1044 size_t idx = -1;
8631
52956d669506 Display sensible error message when the help text of an undocumented function is requested
Soren Hauberg <hauberg@gmail.com>
parents: 8630
diff changeset
1045 if (text.empty ())
52956d669506 Display sensible error message when the help text of an undocumented function is requested
Soren Hauberg <hauberg@gmail.com>
parents: 8630
diff changeset
1046 {
52956d669506 Display sensible error message when the help text of an undocumented function is requested
Soren Hauberg <hauberg@gmail.com>
parents: 8630
diff changeset
1047 format = "Not documented";
52956d669506 Display sensible error message when the help text of an undocumented function is requested
Soren Hauberg <hauberg@gmail.com>
parents: 8630
diff changeset
1048 }
52956d669506 Display sensible error message when the help text of an undocumented function is requested
Soren Hauberg <hauberg@gmail.com>
parents: 8630
diff changeset
1049 else if (looks_like_texinfo (text, idx))
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1050 {
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1051 format = "texinfo";
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1052 text.erase (0, idx);
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1053 }
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1054 else if (looks_like_html (text))
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1055 {
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1056 format = "html";
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1057 }
5399
db34dff19947 [project @ 2005-06-17 21:16:20 by jwe]
jwe
parents: 5393
diff changeset
1058 else
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1059 {
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1060 format = "plain text";
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1061 }
1140
26d986865487 [project @ 1995-02-26 03:23:43 by jwe]
jwe
parents: 1118
diff changeset
1062 }
26d986865487 [project @ 1995-02-26 03:23:43 by jwe]
jwe
parents: 1118
diff changeset
1063 }
26d986865487 [project @ 1995-02-26 03:23:43 by jwe]
jwe
parents: 1118
diff changeset
1064
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1065 DEFUN (get_help_text, args, , "-*- texinfo -*-\n\
15038
ab18578c2ade doc: Update docstrings for built-in functions to not use "Loadable Function" as type.
Rik <rik@octave.org>
parents: 15020
diff changeset
1066 @deftypefn {Built-in Function} {[@var{text}, @var{format}] =} get_help_text (@var{name})\n\
12519
91ccd08fe80c Add gen_doc_cache, get_help_text, get_help_text_from_file, get_first_help_sentence to documentation.
Rik <octave@nomad.inbox5.com>
parents: 12483
diff changeset
1067 Return the raw help text of function @var{name}.\n\
3168
1c267910655d [project @ 1998-04-19 01:22:38 by jwe]
jwe
parents: 3164
diff changeset
1068 \n\
12519
91ccd08fe80c Add gen_doc_cache, get_help_text, get_help_text_from_file, get_first_help_sentence to documentation.
Rik <octave@nomad.inbox5.com>
parents: 12483
diff changeset
1069 The raw help text is returned in @var{text} and the format in @var{format}\n\
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1070 The format is a string which is one of @qcode{\"texinfo\"},\n\
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1071 @qcode{\"html\"}, or @qcode{\"plain text\"}.\n\
8812
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1072 @end deftypefn")
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 389
diff changeset
1073 {
2086
bfb775fb6fe8 [project @ 1996-04-25 05:55:19 by jwe]
jwe
parents: 1996
diff changeset
1074 octave_value_list retval;
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 389
diff changeset
1075
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1076 if (args.length () == 1)
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1077 {
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1078 const std::string name = args (0).string_value ();
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
1079
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1080 if (! error_state)
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1081 {
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1082 std::string text;
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1083 std::string format;
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 389
diff changeset
1084
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1085 do_get_help_text (name, text, format);
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11572
diff changeset
1086
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1087 retval(1) = format;
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1088 retval(0) = text;
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1089 }
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1090 else
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1091 error ("get_help_text: invalid input");
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1092 }
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 389
diff changeset
1093 else
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1094 print_usage ();
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 389
diff changeset
1095
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 389
diff changeset
1096 return retval;
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 389
diff changeset
1097 }
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 389
diff changeset
1098
9806
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1099 static void
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1100 do_get_help_text_from_file (const std::string& fname, std::string& text,
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1101 std::string& format)
9806
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1102 {
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1103 bool symbol_found = false;
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1104
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1105 std::string f;
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1106
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1107 raw_help_from_file (fname, text, f, symbol_found);
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1108
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1109 format = "Not found";
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1110 if (symbol_found)
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1111 {
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1112 size_t idx = -1;
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1113 if (text.empty ())
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1114 {
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1115 format = "Not documented";
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1116 }
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1117 else if (looks_like_texinfo (text, idx))
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1118 {
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1119 format = "texinfo";
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1120 text.erase (0, idx);
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1121 }
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1122 else if (looks_like_html (text))
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1123 {
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1124 format = "html";
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1125 }
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1126 else
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1127 {
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1128 format = "plain text";
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1129 }
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1130 }
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1131 }
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1132
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1133 DEFUN (get_help_text_from_file, args, ,
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
1134 "-*- texinfo -*-\n\
15038
ab18578c2ade doc: Update docstrings for built-in functions to not use "Loadable Function" as type.
Rik <rik@octave.org>
parents: 15020
diff changeset
1135 @deftypefn {Built-in Function} {[@var{text}, @var{format}] =} get_help_text_from_file (@var{fname})\n\
12519
91ccd08fe80c Add gen_doc_cache, get_help_text, get_help_text_from_file, get_first_help_sentence to documentation.
Rik <octave@nomad.inbox5.com>
parents: 12483
diff changeset
1136 Return the raw help text from the file @var{fname}.\n\
9806
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1137 \n\
12519
91ccd08fe80c Add gen_doc_cache, get_help_text, get_help_text_from_file, get_first_help_sentence to documentation.
Rik <octave@nomad.inbox5.com>
parents: 12483
diff changeset
1138 The raw help text is returned in @var{text} and the format in @var{format}\n\
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1139 The format is a string which is one of @qcode{\"texinfo\"},\n\
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1140 @qcode{\"html\"}, or @qcode{\"plain text\"}.\n\
9806
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1141 @end deftypefn")
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1142 {
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1143 octave_value_list retval;
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1144
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1145 if (args.length () == 1)
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1146 {
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1147 const std::string fname = args(0).string_value ();
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1148
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1149 if (! error_state)
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1150 {
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1151 std::string text;
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1152 std::string format;
9806
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1153
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1154 do_get_help_text_from_file (fname, text, format);
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11572
diff changeset
1155
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1156 retval(1) = format;
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1157 retval(0) = text;
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1158 }
9806
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1159 else
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1160 error ("get_help_text_from_file: invalid input");
9806
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1161 }
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1162 else
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1163 print_usage ();
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1164
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1165 return retval;
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1166 }
8e345f2fe4d6 improved support for Contents.m files
John W. Eaton <jwe@octave.org>
parents: 9416
diff changeset
1167
8812
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1168 // Return a cell array of strings containing the names of all
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1169 // operators.
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1170
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1171 DEFUN (__operators__, , ,
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
1172 "-*- texinfo -*-\n\
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1173 @deftypefn {Function File} __operators__ ()\n\
8812
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1174 Undocumented internal function.\n\
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1175 @end deftypefn")
3355
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
1176 {
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1177 return octave_value (Cell (names (operators_map)));
3355
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
1178 }
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
1179
8812
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1180 // Return a cell array of strings containing the names of all
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1181 // keywords.
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1182
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1183 DEFUN (__keywords__, , ,
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
1184 "-*- texinfo -*-\n\
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1185 @deftypefn {Function File} __keywords__ ()\n\
8812
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1186 Undocumented internal function.\n\
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1187 @end deftypefn")
581
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 572
diff changeset
1188 {
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1189 return octave_value (Cell (names (keywords_map)));
581
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 572
diff changeset
1190 }
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 572
diff changeset
1191
8812
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1192 // Return a cell array of strings containing the names of all builtin
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1193 // functions.
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1194
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1195 DEFUN (__builtins__, , ,
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
1196 "-*- texinfo -*-\n\
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1197 @deftypefn {Function File} __builtins__ ()\n\
8812
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1198 Undocumented internal function.\n\
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1199 @end deftypefn")
3355
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
1200 {
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1201 const string_vector bif = symbol_table::built_in_function_names ();
3355
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
1202
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1203 return octave_value (Cell (bif));
3355
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
1204 }
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
1205
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1206 static std::string
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1207 do_which (const std::string& name, std::string& type)
3355
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
1208 {
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1209 std::string file;
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1210
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1211 type = std::string ();
3355
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
1212
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7272
diff changeset
1213 octave_value val = symbol_table::find_function (name);
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7272
diff changeset
1214
9416
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1215 if (name.find_first_of ('.') == std::string::npos)
3355
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
1216 {
9416
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1217 if (val.is_defined ())
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1218 {
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1219 octave_function *fcn = val.function_value ();
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7272
diff changeset
1220
9416
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1221 if (fcn)
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1222 {
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1223 file = fcn->fcn_file_name ();
3355
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
1224
9416
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1225 if (file.empty ())
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1226 {
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1227 if (fcn->is_user_function ())
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1228 type = "command-line function";
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1229 else
15005
74c7265c057a fix failure with function handles caused by changeset ea6997657614
John W. Eaton <jwe@octave.org>
parents: 14766
diff changeset
1230 {
74c7265c057a fix failure with function handles caused by changeset ea6997657614
John W. Eaton <jwe@octave.org>
parents: 14766
diff changeset
1231 file = fcn->src_file_name ();
74c7265c057a fix failure with function handles caused by changeset ea6997657614
John W. Eaton <jwe@octave.org>
parents: 14766
diff changeset
1232 type = "built-in function";
74c7265c057a fix failure with function handles caused by changeset ea6997657614
John W. Eaton <jwe@octave.org>
parents: 14766
diff changeset
1233 }
9416
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1234 }
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1235 else
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1236 type = val.is_user_script ()
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
1237 ? std::string ("script") : std::string ("function");
9416
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1238 }
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1239 }
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1240 else
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1241 {
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1242 // We might find a file that contains only a doc string.
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1243
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1244 file = load_path::find_fcn_file (name);
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1245 }
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7272
diff changeset
1246 }
8672
2a49c32d4322 allow help to work with files containing only comments
John W. Eaton <jwe@octave.org>
parents: 8631
diff changeset
1247 else
2a49c32d4322 allow help to work with files containing only comments
John W. Eaton <jwe@octave.org>
parents: 8631
diff changeset
1248 {
9416
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1249 // File query.
8672
2a49c32d4322 allow help to work with files containing only comments
John W. Eaton <jwe@octave.org>
parents: 8631
diff changeset
1250
9416
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1251 // For compatibility: "file." queries "file".
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1252 if (name.size () > 1 && name[name.size () - 1] == '.')
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1253 file = load_path::find_file (name.substr (0, name.size () - 1));
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1254 else
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1255 file = load_path::find_file (name);
17829
c2d9d42f4fe1 which: return the full path to a regular file (bug #40332)
Mike Miller <mtmiller@ieee.org>
parents: 17787
diff changeset
1256
c2d9d42f4fe1 which: return the full path to a regular file (bug #40332)
Mike Miller <mtmiller@ieee.org>
parents: 17787
diff changeset
1257 file = octave_env::make_absolute (file);
8672
2a49c32d4322 allow help to work with files containing only comments
John W. Eaton <jwe@octave.org>
parents: 8631
diff changeset
1258 }
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1259
9416
2cc47338e427 allow which look for files on path
Jaroslav Hajek <highegg@gmail.com>
parents: 9377
diff changeset
1260
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1261 return file;
3355
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
1262 }
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
1263
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1264 std::string
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1265 do_which (const std::string& name)
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1266 {
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1267 std::string retval;
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1268
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1269 std::string type;
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1270
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1271 retval = do_which (name, type);
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1272
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1273 return retval;
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1274 }
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1275
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1276 DEFUN (__which__, args, ,
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
1277 "-*- texinfo -*-\n\
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1278 @deftypefn {Built-in Function} {} __which__ (@var{name}, @dots{})\n\
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1279 Undocumented internal function.\n\
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1280 @end deftypefn")
581
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 572
diff changeset
1281 {
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1282 octave_value retval;
581
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 572
diff changeset
1283
1968
a2e206524aa0 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents: 1957
diff changeset
1284 string_vector argv = args.make_argv ("which");
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
1285
3355
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
1286 if (! error_state)
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
1287 {
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
1288 int argc = argv.length ();
581
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 572
diff changeset
1289
3355
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
1290 if (argc > 1)
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1291 {
11059
4ffa19147604 replace Octave_map->octave_scalar_map in help.cc and load-save.cc
Jaroslav Hajek <highegg@gmail.com>
parents: 10840
diff changeset
1292 octave_map m (dim_vector (1, argc-1));
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1293
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1294 Cell names (1, argc-1);
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1295 Cell files (1, argc-1);
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1296 Cell types (1, argc-1);
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1297
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1298 for (int i = 1; i < argc; i++)
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1299 {
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1300 std::string name = argv[i];
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1301
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1302 std::string type;
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1303
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1304 std::string file = do_which (name, type);
3141
292ff0bf484b [project @ 1998-02-03 08:11:07 by jwe]
jwe
parents: 3018
diff changeset
1305
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1306 names(i-1) = name;
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1307 files(i-1) = file;
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1308 types(i-1) = type;
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1309 }
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1310
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1311 m.assign ("name", names);
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1312 m.assign ("file", files);
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1313 m.assign ("type", types);
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1314
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1315 retval = m;
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1316 }
3355
c4983fc7318f [project @ 1999-11-18 05:20:50 by jwe]
jwe
parents: 3333
diff changeset
1317 else
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1318 print_usage ();
581
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 572
diff changeset
1319 }
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 572
diff changeset
1320
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 572
diff changeset
1321 return retval;
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 572
diff changeset
1322 }
bc813f5eb025 [project @ 1994-08-07 01:02:15 by jwe]
jwe
parents: 572
diff changeset
1323
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
1324 // FIXME: Are we sure this function always does the right thing?
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1325 inline bool
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1326 file_is_in_dir (const std::string filename, const std::string dir)
5447
051ddd7a6681 [project @ 2005-09-14 05:18:23 by jwe]
jwe
parents: 5399
diff changeset
1327 {
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1328 if (filename.find (dir) == 0)
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1329 {
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1330 const int dir_len = dir.size ();
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1331 const int filename_len = filename.size ();
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
1332 const int max_allowed_seps = file_ops::is_dir_sep (dir[dir_len-1]) ? 0
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
1333 : 1;
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11572
diff changeset
1334
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1335 int num_seps = 0;
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1336 for (int i = dir_len; i < filename_len; i++)
15020
560317fd5977 maint: Cuddle open bracket used for indexing C++ arrays in source code.
Rik <rik@octave.org>
parents: 15005
diff changeset
1337 if (file_ops::is_dir_sep (filename[i]))
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1338 num_seps ++;
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11572
diff changeset
1339
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1340 return (num_seps <= max_allowed_seps);
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1341 }
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1342 else
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1343 return false;
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1344 }
5447
051ddd7a6681 [project @ 2005-09-14 05:18:23 by jwe]
jwe
parents: 5399
diff changeset
1345
8812
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1346 // Return a cell array of strings containing the names of all
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1347 // functions available in DIRECTORY. If no directory is given, search
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1348 // the current path.
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1349
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1350 DEFUN (__list_functions__, args, ,
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
1351 "-*- texinfo -*-\n\
10840
89f4d7e294cc Grammarcheck .cc files
Rik <octave@nomad.inbox5.com>
parents: 10500
diff changeset
1352 @deftypefn {Function File} {@var{retval} =} __list_functions__ ()\n\
89f4d7e294cc Grammarcheck .cc files
Rik <octave@nomad.inbox5.com>
parents: 10500
diff changeset
1353 @deftypefnx {Function File} {@var{retval} =} __list_functions__ (@var{directory})\n\
8812
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1354 Undocumented internal function.\n\
7d48766c21a5 use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents: 8672
diff changeset
1355 @end deftypefn")
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1356 {
8863
34a821854961 pkg.m (generate_lookfor_cache): generate a DOC file for each directory
Jason Riedy <jason@acm.org>
parents: 8861
diff changeset
1357 octave_value retval;
5447
051ddd7a6681 [project @ 2005-09-14 05:18:23 by jwe]
jwe
parents: 5399
diff changeset
1358
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1359 // Get list of functions
8863
34a821854961 pkg.m (generate_lookfor_cache): generate a DOC file for each directory
Jason Riedy <jason@acm.org>
parents: 8861
diff changeset
1360 string_vector ffl = load_path::fcn_names ();
34a821854961 pkg.m (generate_lookfor_cache): generate a DOC file for each directory
Jason Riedy <jason@acm.org>
parents: 8861
diff changeset
1361 string_vector afl = autoloaded_functions ();
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11572
diff changeset
1362
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1363 if (args.length () == 0)
8863
34a821854961 pkg.m (generate_lookfor_cache): generate a DOC file for each directory
Jason Riedy <jason@acm.org>
parents: 8861
diff changeset
1364 retval = Cell (ffl.append (afl));
5447
051ddd7a6681 [project @ 2005-09-14 05:18:23 by jwe]
jwe
parents: 5399
diff changeset
1365 else
051ddd7a6681 [project @ 2005-09-14 05:18:23 by jwe]
jwe
parents: 5399
diff changeset
1366 {
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 8503
diff changeset
1367 std::string dir = args (0).string_value ();
8863
34a821854961 pkg.m (generate_lookfor_cache): generate a DOC file for each directory
Jason Riedy <jason@acm.org>
parents: 8861
diff changeset
1368
34a821854961 pkg.m (generate_lookfor_cache): generate a DOC file for each directory
Jason Riedy <jason@acm.org>
parents: 8861
diff changeset
1369 if (! error_state)
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1370 {
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1371 string_vector fl = load_path::files (dir, true);
8863
34a821854961 pkg.m (generate_lookfor_cache): generate a DOC file for each directory
Jason Riedy <jason@acm.org>
parents: 8861
diff changeset
1372
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1373 if (! error_state)
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1374 {
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1375 // Return a sorted list with unique entries (in case of
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1376 // .m and .oct versions of the same function in a given
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1377 // directory, for example).
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1378 fl.sort (true);
9261
95445f9f5976 omit file extensions from __list_functions__ output
John W. Eaton <jwe@octave.org>
parents: 9133
diff changeset
1379
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1380 retval = Cell (fl);
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1381 }
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
1382 }
5447
051ddd7a6681 [project @ 2005-09-14 05:18:23 by jwe]
jwe
parents: 5399
diff changeset
1383 else
12483
7a5aacf65f81 Rewrite error strings in src/ to use variables named in documentation.
Rik <octave@nomad.inbox5.com>
parents: 11586
diff changeset
1384 error ("__list_functions__: DIRECTORY argument must be a string");
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11572
diff changeset
1385 }
5447
051ddd7a6681 [project @ 2005-09-14 05:18:23 by jwe]
jwe
parents: 5399
diff changeset
1386
051ddd7a6681 [project @ 2005-09-14 05:18:23 by jwe]
jwe
parents: 5399
diff changeset
1387 return retval;
051ddd7a6681 [project @ 2005-09-14 05:18:23 by jwe]
jwe
parents: 5399
diff changeset
1388 }
051ddd7a6681 [project @ 2005-09-14 05:18:23 by jwe]
jwe
parents: 5399
diff changeset
1389
8861
31f864877246 doc and lookfor fixes
John W. Eaton <jwe@octave.org>
parents: 8812
diff changeset
1390 DEFUN (doc_cache_file, args, nargout,
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
1391 "-*- texinfo -*-\n\
10840
89f4d7e294cc Grammarcheck .cc files
Rik <octave@nomad.inbox5.com>
parents: 10500
diff changeset
1392 @deftypefn {Built-in Function} {@var{val} =} doc_cache_file ()\n\
8861
31f864877246 doc and lookfor fixes
John W. Eaton <jwe@octave.org>
parents: 8812
diff changeset
1393 @deftypefnx {Built-in Function} {@var{old_val} =} doc_cache_file (@var{new_val})\n\
13951
79aa00a94e9e doc: Document "local" option for configuration variables.
Rik <octave@nomad.inbox5.com>
parents: 13773
diff changeset
1394 @deftypefnx {Built-in Function} {} doc_cache_file (@var{new_val}, \"local\")\n\
8861
31f864877246 doc and lookfor fixes
John W. Eaton <jwe@octave.org>
parents: 8812
diff changeset
1395 Query or set the internal variable that specifies the name of the\n\
9133
c0cef1436788 Update help text for sections 2.2 and 2.3 of basics.txi
Rik <rdrider0-list@yahoo.com>
parents: 9064
diff changeset
1396 Octave documentation cache file. A cache file significantly improves\n\
c0cef1436788 Update help text for sections 2.2 and 2.3 of basics.txi
Rik <rdrider0-list@yahoo.com>
parents: 9064
diff changeset
1397 the performance of the @code{lookfor} command. The default value is \n\
c0cef1436788 Update help text for sections 2.2 and 2.3 of basics.txi
Rik <rdrider0-list@yahoo.com>
parents: 9064
diff changeset
1398 @file{@var{octave-home}/share/octave/@var{version}/etc/doc-cache},\n\
c0cef1436788 Update help text for sections 2.2 and 2.3 of basics.txi
Rik <rdrider0-list@yahoo.com>
parents: 9064
diff changeset
1399 in which @var{octave-home} is the root directory of the Octave installation,\n\
c0cef1436788 Update help text for sections 2.2 and 2.3 of basics.txi
Rik <rdrider0-list@yahoo.com>
parents: 9064
diff changeset
1400 and @var{version} is the Octave version number.\n\
c0cef1436788 Update help text for sections 2.2 and 2.3 of basics.txi
Rik <rdrider0-list@yahoo.com>
parents: 9064
diff changeset
1401 The default value may be overridden by the environment variable\n\
10840
89f4d7e294cc Grammarcheck .cc files
Rik <octave@nomad.inbox5.com>
parents: 10500
diff changeset
1402 @w{@env{OCTAVE_DOC_CACHE_FILE}}, or the command line argument\n\
16807
2fd22fbaffa3 doc: Add built_in_docstrings_file() to documentation.
Rik <rik@octave.org>
parents: 16199
diff changeset
1403 @samp{--doc-cache-file FNAME}.\n\
13951
79aa00a94e9e doc: Document "local" option for configuration variables.
Rik <octave@nomad.inbox5.com>
parents: 13773
diff changeset
1404 \n\
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1405 When called from inside a function with the @qcode{\"local\"} option, the\n\
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1406 variable is changed locally for the function and any subroutines it calls. \n\
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1407 The original variable value is restored when exiting the function.\n\
16872
5372068bb148 Rename gen_doc_cache() to doc_cache_create().
Rik <rik@octave.org>
parents: 16807
diff changeset
1408 @seealso{doc_cache_create, lookfor, info_program, doc, help, makeinfo_program}\n\
8861
31f864877246 doc and lookfor fixes
John W. Eaton <jwe@octave.org>
parents: 8812
diff changeset
1409 @end deftypefn")
31f864877246 doc and lookfor fixes
John W. Eaton <jwe@octave.org>
parents: 8812
diff changeset
1410 {
31f864877246 doc and lookfor fixes
John W. Eaton <jwe@octave.org>
parents: 8812
diff changeset
1411 return SET_NONEMPTY_INTERNAL_STRING_VARIABLE (doc_cache_file);
31f864877246 doc and lookfor fixes
John W. Eaton <jwe@octave.org>
parents: 8812
diff changeset
1412 }
31f864877246 doc and lookfor fixes
John W. Eaton <jwe@octave.org>
parents: 8812
diff changeset
1413
14614
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
1414 DEFUN (texi_macros_file, args, nargout,
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
1415 "-*- texinfo -*-\n\
14614
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
1416 @deftypefn {Built-in Function} {@var{val} =} texi_macros_file ()\n\
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
1417 @deftypefnx {Built-in Function} {@var{old_val} =} texi_macros_file (@var{new_val})\n\
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
1418 @deftypefnx {Built-in Function} {} texi_macros_file (@var{new_val}, \"local\")\n\
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
1419 Query or set the internal variable that specifies the name of the\n\
14618
36f451642f79 doc: Add texi_macros_file to manual.
Rik <octave@nomad.inbox5.com>
parents: 14614
diff changeset
1420 file containing Texinfo macros that are prepended to documentation strings\n\
14614
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
1421 before they are passed to makeinfo. The default value is \n\
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
1422 @file{@var{octave-home}/share/octave/@var{version}/etc/macros.texi},\n\
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
1423 in which @var{octave-home} is the root directory of the Octave installation,\n\
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
1424 and @var{version} is the Octave version number.\n\
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
1425 The default value may be overridden by the environment variable\n\
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
1426 @w{@env{OCTAVE_TEXI_MACROS_FILE}}, or the command line argument\n\
16807
2fd22fbaffa3 doc: Add built_in_docstrings_file() to documentation.
Rik <rik@octave.org>
parents: 16199
diff changeset
1427 @samp{--texi-macros-file FNAME}.\n\
14614
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
1428 \n\
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1429 When called from inside a function with the @qcode{\"local\"} option, the\n\
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1430 variable is changed locally for the function and any subroutines it calls. \n\
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1431 The original variable value is restored when exiting the function.\n\
14618
36f451642f79 doc: Add texi_macros_file to manual.
Rik <octave@nomad.inbox5.com>
parents: 14614
diff changeset
1432 @seealso{makeinfo_program}\n\
14614
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
1433 @end deftypefn")
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
1434 {
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
1435 return SET_NONEMPTY_INTERNAL_STRING_VARIABLE (texi_macros_file);
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
1436 }
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14360
diff changeset
1437
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1438 DEFUN (info_file, args, nargout,
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
1439 "-*- texinfo -*-\n\
10840
89f4d7e294cc Grammarcheck .cc files
Rik <octave@nomad.inbox5.com>
parents: 10500
diff changeset
1440 @deftypefn {Built-in Function} {@var{val} =} info_file ()\n\
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1441 @deftypefnx {Built-in Function} {@var{old_val} =} info_file (@var{new_val})\n\
13951
79aa00a94e9e doc: Document "local" option for configuration variables.
Rik <octave@nomad.inbox5.com>
parents: 13773
diff changeset
1442 @deftypefnx {Built-in Function} {} info_file (@var{new_val}, \"local\")\n\
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1443 Query or set the internal variable that specifies the name of the\n\
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1444 Octave info file. The default value is\n\
9133
c0cef1436788 Update help text for sections 2.2 and 2.3 of basics.txi
Rik <rdrider0-list@yahoo.com>
parents: 9064
diff changeset
1445 @file{@var{octave-home}/info/octave.info}, in\n\
c0cef1436788 Update help text for sections 2.2 and 2.3 of basics.txi
Rik <rdrider0-list@yahoo.com>
parents: 9064
diff changeset
1446 which @var{octave-home} is the root directory of the Octave installation.\n\
c0cef1436788 Update help text for sections 2.2 and 2.3 of basics.txi
Rik <rdrider0-list@yahoo.com>
parents: 9064
diff changeset
1447 The default value may be overridden by the environment variable\n\
10840
89f4d7e294cc Grammarcheck .cc files
Rik <octave@nomad.inbox5.com>
parents: 10500
diff changeset
1448 @w{@env{OCTAVE_INFO_FILE}}, or the command line argument\n\
16807
2fd22fbaffa3 doc: Add built_in_docstrings_file() to documentation.
Rik <rik@octave.org>
parents: 16199
diff changeset
1449 @samp{--info-file FNAME}.\n\
13951
79aa00a94e9e doc: Document "local" option for configuration variables.
Rik <octave@nomad.inbox5.com>
parents: 13773
diff changeset
1450 \n\
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1451 When called from inside a function with the @qcode{\"local\"} option, the\n\
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1452 variable is changed locally for the function and any subroutines it calls. \n\
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1453 The original variable value is restored when exiting the function.\n\
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1454 @seealso{info_program, doc, help, makeinfo_program}\n\
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1455 @end deftypefn")
2202
31b62b7c5d2d [project @ 1996-05-15 06:07:11 by jwe]
jwe
parents: 2189
diff changeset
1456 {
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1457 return SET_NONEMPTY_INTERNAL_STRING_VARIABLE (info_file);
2202
31b62b7c5d2d [project @ 1996-05-15 06:07:11 by jwe]
jwe
parents: 2189
diff changeset
1458 }
31b62b7c5d2d [project @ 1996-05-15 06:07:11 by jwe]
jwe
parents: 2189
diff changeset
1459
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1460 DEFUN (info_program, args, nargout,
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
1461 "-*- texinfo -*-\n\
10840
89f4d7e294cc Grammarcheck .cc files
Rik <octave@nomad.inbox5.com>
parents: 10500
diff changeset
1462 @deftypefn {Built-in Function} {@var{val} =} info_program ()\n\
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1463 @deftypefnx {Built-in Function} {@var{old_val} =} info_program (@var{new_val})\n\
13951
79aa00a94e9e doc: Document "local" option for configuration variables.
Rik <octave@nomad.inbox5.com>
parents: 13773
diff changeset
1464 @deftypefnx {Built-in Function} {} info_program (@var{new_val}, \"local\")\n\
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1465 Query or set the internal variable that specifies the name of the\n\
7096
81bed50b9feb [project @ 2007-11-02 16:13:43 by jwe]
jwe
parents: 7082
diff changeset
1466 info program to run. The default value is\n\
9133
c0cef1436788 Update help text for sections 2.2 and 2.3 of basics.txi
Rik <rdrider0-list@yahoo.com>
parents: 9064
diff changeset
1467 @file{@var{octave-home}/libexec/octave/@var{version}/exec/@var{arch}/info}\n\
c0cef1436788 Update help text for sections 2.2 and 2.3 of basics.txi
Rik <rdrider0-list@yahoo.com>
parents: 9064
diff changeset
1468 in which @var{octave-home} is the root directory of the Octave installation,\n\
c0cef1436788 Update help text for sections 2.2 and 2.3 of basics.txi
Rik <rdrider0-list@yahoo.com>
parents: 9064
diff changeset
1469 @var{version} is the Octave version number, and @var{arch}\n\
3686
9507d6de9bbd [project @ 2000-06-29 16:30:44 by jwe]
jwe
parents: 3584
diff changeset
1470 is the system type (for example, @code{i686-pc-linux-gnu}). The\n\
9133
c0cef1436788 Update help text for sections 2.2 and 2.3 of basics.txi
Rik <rdrider0-list@yahoo.com>
parents: 9064
diff changeset
1471 default value may be overridden by the environment variable\n\
10840
89f4d7e294cc Grammarcheck .cc files
Rik <octave@nomad.inbox5.com>
parents: 10500
diff changeset
1472 @w{@env{OCTAVE_INFO_PROGRAM}}, or the command line argument\n\
9133
c0cef1436788 Update help text for sections 2.2 and 2.3 of basics.txi
Rik <rdrider0-list@yahoo.com>
parents: 9064
diff changeset
1473 @samp{--info-program NAME}.\n\
13951
79aa00a94e9e doc: Document "local" option for configuration variables.
Rik <octave@nomad.inbox5.com>
parents: 13773
diff changeset
1474 \n\
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1475 When called from inside a function with the @qcode{\"local\"} option, the\n\
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1476 variable is changed locally for the function and any subroutines it calls. \n\
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1477 The original variable value is restored when exiting the function.\n\
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1478 @seealso{info_file, doc, help, makeinfo_program}\n\
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1479 @end deftypefn")
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1480 {
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1481 return SET_NONEMPTY_INTERNAL_STRING_VARIABLE (info_program);
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1482 }
3686
9507d6de9bbd [project @ 2000-06-29 16:30:44 by jwe]
jwe
parents: 3584
diff changeset
1483
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1484 DEFUN (makeinfo_program, args, nargout,
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
1485 "-*- texinfo -*-\n\
10840
89f4d7e294cc Grammarcheck .cc files
Rik <octave@nomad.inbox5.com>
parents: 10500
diff changeset
1486 @deftypefn {Built-in Function} {@var{val} =} makeinfo_program ()\n\
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1487 @deftypefnx {Built-in Function} {@var{old_val} =} makeinfo_program (@var{new_val})\n\
13951
79aa00a94e9e doc: Document "local" option for configuration variables.
Rik <octave@nomad.inbox5.com>
parents: 13773
diff changeset
1488 @deftypefnx {Built-in Function} {} makeinfo_program (@var{new_val}, \"local\")\n\
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1489 Query or set the internal variable that specifies the name of the\n\
9133
c0cef1436788 Update help text for sections 2.2 and 2.3 of basics.txi
Rik <rdrider0-list@yahoo.com>
parents: 9064
diff changeset
1490 program that Octave runs to format help text containing\n\
c0cef1436788 Update help text for sections 2.2 and 2.3 of basics.txi
Rik <rdrider0-list@yahoo.com>
parents: 9064
diff changeset
1491 Texinfo markup commands. The default value is @code{makeinfo}.\n\
13951
79aa00a94e9e doc: Document "local" option for configuration variables.
Rik <octave@nomad.inbox5.com>
parents: 13773
diff changeset
1492 \n\
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1493 When called from inside a function with the @qcode{\"local\"} option, the\n\
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1494 variable is changed locally for the function and any subroutines it calls. \n\
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1495 The original variable value is restored when exiting the function.\n\
14618
36f451642f79 doc: Add texi_macros_file to manual.
Rik <octave@nomad.inbox5.com>
parents: 14614
diff changeset
1496 @seealso{texi_macros_file, info_file, info_program, doc, help}\n\
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1497 @end deftypefn")
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1498 {
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1499 return SET_NONEMPTY_INTERNAL_STRING_VARIABLE (makeinfo_program);
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1500 }
2202
31b62b7c5d2d [project @ 1996-05-15 06:07:11 by jwe]
jwe
parents: 2189
diff changeset
1501
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1502 DEFUN (suppress_verbose_help_message, args, nargout,
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
1503 "-*- texinfo -*-\n\
10840
89f4d7e294cc Grammarcheck .cc files
Rik <octave@nomad.inbox5.com>
parents: 10500
diff changeset
1504 @deftypefn {Built-in Function} {@var{val} =} suppress_verbose_help_message ()\n\
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1505 @deftypefnx {Built-in Function} {@var{old_val} =} suppress_verbose_help_message (@var{new_val})\n\
13951
79aa00a94e9e doc: Document "local" option for configuration variables.
Rik <octave@nomad.inbox5.com>
parents: 13773
diff changeset
1506 @deftypefnx {Built-in Function} {} suppress_verbose_help_message (@var{new_val}, \"local\")\n\
7001
8b0cfeb06365 [project @ 2007-10-10 18:02:59 by jwe]
jwe
parents: 6620
diff changeset
1507 Query or set the internal variable that controls whether Octave\n\
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1508 will add additional help information to the end of the output from\n\
3332
7c03933635c6 [project @ 1999-11-02 06:57:12 by jwe]
jwe
parents: 3330
diff changeset
1509 the @code{help} command and usage messages for built-in commands.\n\
13951
79aa00a94e9e doc: Document "local" option for configuration variables.
Rik <octave@nomad.inbox5.com>
parents: 13773
diff changeset
1510 \n\
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1511 When called from inside a function with the @qcode{\"local\"} option, the\n\
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1512 variable is changed locally for the function and any subroutines it calls. \n\
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17256
diff changeset
1513 The original variable value is restored when exiting the function.\n\
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1514 @end deftypefn")
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1515 {
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5780
diff changeset
1516 return SET_INTERNAL_VARIABLE (suppress_verbose_help_message);
2189
d01936305d99 [project @ 1996-05-14 03:31:57 by jwe]
jwe
parents: 2177
diff changeset
1517 }