1
|
1 // builtins.cc -*- C++ -*- |
|
2 /* |
|
3 |
|
4 Copyright (C) 1992, 1993 John W. Eaton |
|
5 |
|
6 This file is part of Octave. |
|
7 |
|
8 Octave is free software; you can redistribute it and/or modify it |
|
9 under the terms of the GNU General Public License as published by the |
|
10 Free Software Foundation; either version 2, or (at your option) any |
|
11 later version. |
|
12 |
|
13 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
16 for more details. |
|
17 |
|
18 You should have received a copy of the GNU General Public License |
|
19 along with Octave; see the file COPYING. If not, write to the Free |
|
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
|
21 |
|
22 */ |
|
23 |
240
|
24 #ifdef HAVE_CONFIG_H |
|
25 #include "config.h" |
1
|
26 #endif |
|
27 |
|
28 #include <iostream.h> |
181
|
29 #include <strstream.h> |
1
|
30 #include <math.h> |
|
31 #include <float.h> |
|
32 |
|
33 #include "tree-const.h" |
|
34 #include "t-builtins.h" |
|
35 #include "g-builtins.h" |
|
36 #include "builtins.h" |
|
37 #include "octave.h" |
|
38 #include "utils.h" |
|
39 #include "tree.h" |
164
|
40 #include "help.h" |
181
|
41 #include "pager.h" |
1
|
42 #include "mappers.h" |
|
43 #include "user-prefs.h" |
|
44 #include "variables.h" |
|
45 |
|
46 // NOTE: nargin == 1 means that the function takes no arguments (just |
|
47 // like C, the first argument is (or should be, anyway) the function |
|
48 // name). Also, -1 is shorthand for infinity. |
|
49 |
|
50 // The following initializations may eventually need to be reworked |
|
51 // like the builtin functions in bash were around version 1.12... |
|
52 |
|
53 static builtin_mapper_functions mapper_functions[] = |
|
54 { |
|
55 { "abs", 2, 1, 0, fabs, abs, NULL, |
181
|
56 "abs (X): compute abs (X) for each element of X", }, |
1
|
57 |
|
58 { "acos", 2, 1, 0, acos, NULL, acos, |
181
|
59 "acos (X): compute acos (X) for each element of X", }, |
1
|
60 |
|
61 { "acosh", 2, 1, 0, acosh, NULL, acosh, |
181
|
62 "acosh (X): compute acosh (X) for each element of X", }, |
1
|
63 |
|
64 { "angle", 2, 1, 0, arg, arg, NULL, |
181
|
65 "angle (X): compute arg (X) for each element of X", }, |
1
|
66 |
|
67 { "arg", 2, 1, 0, arg, arg, NULL, |
181
|
68 "arg (X): compute arg (X) for each element of X", }, |
1
|
69 |
|
70 { "asin", 2, 1, 0, asin, NULL, asin, |
181
|
71 "asin (X): compute asin (X) for each element of X", }, |
1
|
72 |
|
73 { "asinh", 2, 1, 0, asinh, NULL, asinh, |
181
|
74 "asinh (X): compute asinh (X) for each element of X", }, |
1
|
75 |
|
76 { "atan", 2, 1, 0, atan, NULL, atan, |
181
|
77 "atan (X): compute atan (X) for each element of X", }, |
1
|
78 |
|
79 { "atanh", 2, 1, 0, atanh, NULL, atanh, |
181
|
80 "atanh (X): compute atanh (X) for each element of X", }, |
1
|
81 |
|
82 { "ceil", 2, 1, 0, ceil, NULL, ceil, |
181
|
83 "ceil (X): round elements of X toward +Inf", }, |
1
|
84 |
|
85 { "conj", 2, 1, 0, conj, NULL, conj, |
181
|
86 "conj (X): compute complex conjugate for each element of X", }, |
1
|
87 |
|
88 { "cos", 2, 1, 0, cos, NULL, cos, |
181
|
89 "cos (X): compute cos (X) for each element of X", }, |
1
|
90 |
|
91 { "cosh", 2, 1, 0, cosh, NULL, cosh, |
181
|
92 "cosh (X): compute cosh (X) for each element of X", }, |
1
|
93 |
|
94 { "exp", 2, 1, 0, exp, NULL, exp, |
181
|
95 "exp (X): compute exp (X) for each element of X", }, |
1
|
96 |
|
97 { "finite", 2, 1, 0, xfinite, xfinite, NULL, |
181
|
98 "finite (X): return 1 for finite elements of X", }, |
1
|
99 |
|
100 { "fix", 2, 1, 0, fix, NULL, fix, |
181
|
101 "fix (X): round elements of X toward zero", }, |
1
|
102 |
|
103 { "floor", 2, 1, 0, floor, NULL, floor, |
181
|
104 "floor (X): round elements of X toward -Inf", }, |
1
|
105 |
|
106 { "isinf", 2, 1, 0, xisinf, xisinf, NULL, |
181
|
107 "isinf (X): return 1 for elements of X infinite", }, |
1
|
108 |
|
109 { "imag", 2, 1, 0, imag, imag, NULL, |
181
|
110 "imag (X): return imaginary part for each elements of X", }, |
1
|
111 |
|
112 #ifdef HAVE_ISNAN |
|
113 { "isnan", 2, 1, 0, xisnan, xisnan, NULL, |
181
|
114 "isnan (X): return 1 where elements of X are NaNs", }, |
1
|
115 #endif |
|
116 |
|
117 { "log", 2, 1, 1, log, NULL, log, |
181
|
118 "log (X): compute log (X) for each element of X", }, |
1
|
119 |
|
120 { "log10", 2, 1, 1, log10, NULL, log10, |
181
|
121 "log10 (X): compute log10 (X) for each element of X", }, |
1
|
122 |
|
123 { "real", 2, 1, 0, real, real, NULL, |
181
|
124 "real (X): return real part for each element of X", }, |
1
|
125 |
|
126 { "round", 2, 1, 0, round, NULL, round, |
181
|
127 "round (X): round elements of X to nearest integer", }, |
1
|
128 |
|
129 { "sign", 2, 1, 0, signum, NULL, signum, |
181
|
130 "sign (X): apply signum function to elements of X", }, |
1
|
131 |
|
132 { "sin", 2, 1, 0, sin, NULL, sin, |
181
|
133 "sin (X): compute sin (X) for each element of X", }, |
1
|
134 |
|
135 { "sinh", 2, 1, 0, sinh, NULL, sinh, |
181
|
136 "sinh (X): compute sinh (X) for each element of X", }, |
1
|
137 |
|
138 { "sqrt", 2, 1, 1, sqrt, NULL, sqrt, |
181
|
139 "sqrt (X): compute sqrt (X) for each element of X", }, |
1
|
140 |
|
141 { "tan", 2, 1, 0, tan, NULL, tan, |
181
|
142 "tan (X): compute tan (X) for each element of X", }, |
1
|
143 |
|
144 { "tanh", 2, 1, 0, tanh, NULL, tanh, |
181
|
145 "tanh (X): compute tanh (X) for each element of X", }, |
1
|
146 |
|
147 { NULL, -1, -1, -1, NULL, NULL, NULL, NULL, }, |
|
148 }; |
|
149 |
|
150 static builtin_text_functions text_functions[] = |
|
151 { |
|
152 { "casesen", 2, builtin_casesen, |
181
|
153 "casesen [on|off]", }, |
1
|
154 |
|
155 { "cd", 2, builtin_cd, |
181
|
156 "cd [dir]\n\n\ |
|
157 change current working directory\n\ |
|
158 if no arguments are given, the current directory is changed to the\n\ |
|
159 users home directory", }, |
1
|
160 |
|
161 { "clear", -1, builtin_clear, |
181
|
162 "clear [name ...]\n\n\ |
|
163 clear symbol(s) matching a list of regular expressions\n\ |
|
164 if no arguments are given, clear all user-defined variables and functions", }, |
1
|
165 |
|
166 { "dir", -1, builtin_ls, |
181
|
167 "dir [options]\n\nprint a directory listing", }, |
1
|
168 |
|
169 { "document", -1, builtin_document, |
181
|
170 "document symbol string ...\n\n", }, |
1
|
171 |
|
172 { "edit_history", -1, builtin_edit_history, |
181
|
173 "edit_history [first] [last]\n\nedit commands from the history list", }, |
1
|
174 |
|
175 { "format", -1, builtin_format, |
181
|
176 "format [style]\n\nset output formatting style", }, |
1
|
177 |
|
178 { "help", -1, builtin_help, |
181
|
179 "help [-i] [topic ...]\n\nprint cryptic yet witty messages", }, |
1
|
180 |
|
181 { "history", -1, builtin_history, |
181
|
182 "history [N] [-w file] [-r file] [-q]\n\n\ |
|
183 display, save, or load command history", }, |
1
|
184 |
|
185 { "load", -1, builtin_load, |
181
|
186 "load [-force] file\n\nload variables from a file", }, |
1
|
187 |
|
188 { "ls", -1, builtin_ls, |
181
|
189 "ls [options]\n\nprint a directory listing", }, |
1
|
190 |
61
|
191 { "run_history", -1, builtin_run_history, |
181
|
192 "run_history [first] [last]\n\nrun commands from the history list", }, |
61
|
193 |
1
|
194 { "save", -1, builtin_save, |
181
|
195 "save file [var ...]\n\nsave variables in a file", }, |
1
|
196 |
|
197 { "set", -1, builtin_set, |
181
|
198 "set [options]\n\nset plotting options", }, |
1
|
199 |
|
200 { "show", -1, builtin_show, |
181
|
201 "show [options]\n\nshow plotting options", }, |
1
|
202 |
|
203 { "who", -1, builtin_who, |
204
|
204 "who [-all] [-builtins] [-functions] [-long] [-variables]\n\n\ |
|
205 List currently defined symbol(s). Options may be shortened to one\n\ |
|
206 character, but may not be combined.", }, |
1
|
207 |
|
208 { NULL, -1, NULL, NULL, }, |
|
209 }; |
|
210 |
|
211 static builtin_general_functions general_functions[] = |
|
212 { |
|
213 { "all", 2, 1, builtin_all, |
181
|
214 "all (X): are all elements of X nonzero?", }, |
1
|
215 |
|
216 { "any", 2, 1, builtin_any, |
181
|
217 "any (X): are any elements of X nonzero?", }, |
1
|
218 |
19
|
219 { "balance", 4, 4, builtin_balance, |
181
|
220 "aa = balance (a [, opt]) or [[dd,] aa] = balance (a [, opt])\n\ |
19
|
221 generalized eigenvalue problem:\n\ |
181
|
222 [cc, dd, aa, bb] = balance (a, b [, opt])\n\ |
|
223 where \"opt\" is an optional single character argument as follows: \n\ |
|
224 \"N\" or \"n\": no balancing; arguments copied, transformation(s) \n\ |
19
|
225 set to identity\n\ |
181
|
226 \"P\" or \"p\": permute argument(s) to isolate eigenvalues where possible\n\ |
|
227 \"S\" or \"s\": scale to improve accuracy of computed eigenvalues\n\ |
|
228 \"B\" or \"b\": (default) permute and scale, in that order. Rows/columns of a \n\ |
19
|
229 (and b) that are isolated by permutation are not scaled\n\ |
|
230 [dd, aa] = balance (a, opt) returns aa = dd\a*dd,\n\ |
181
|
231 [cc, dd, aa, bb] = balance (a, b, opt) returns aa (bb) = cc*a*dd (cc*b*dd)", }, |
|
232 |
|
233 { "chol", 2, 1, builtin_chol, |
|
234 "chol (X): cholesky factorization", }, |
19
|
235 |
1
|
236 { "clc", 1, 0, builtin_clc, |
181
|
237 "clc (): clear screen", }, |
1
|
238 |
|
239 { "clock", 1, 0, builtin_clock, |
181
|
240 "clock (): return current date and time in vector", }, |
1
|
241 |
|
242 { "closeplot", 1, 0, builtin_closeplot, |
181
|
243 "closeplot (): close the stream to plotter", }, |
1
|
244 |
|
245 { "colloc", 7, 4, builtin_colloc, |
181
|
246 "[r, A, B, q] = colloc (n [, \"left\"] [, \"right\"]): collocation weights", }, |
1
|
247 |
|
248 { "cumprod", 2, 1, builtin_cumprod, |
181
|
249 "cumprod (X): cumulative products", }, |
1
|
250 |
|
251 { "cumsum", 2, 1, builtin_cumsum, |
181
|
252 "cumsum (X): cumulative sums", }, |
1
|
253 |
|
254 { "dassl", 5, 1, builtin_dassl, |
181
|
255 "dassl (\"function_name\", x_0, xdot_0, t_out)\n\ |
|
256 dassl (\"function_name\", x_0, xdot_0, t_out, t_crit)\n\ |
1
|
257 \n\ |
|
258 The first argument is the name of the function to call to\n\ |
|
259 compute the vector of residuals. It must have the form\n\ |
|
260 \n\ |
|
261 res = f (x, xdot, t)\n\ |
|
262 \n\ |
181
|
263 where x, xdot, and res are vectors, and t is a scalar.", }, |
1
|
264 |
|
265 { "date", 1, 0, builtin_date, |
181
|
266 "date (): return current date in a string", }, |
1
|
267 |
|
268 { "det", 2, 1, builtin_det, |
181
|
269 "det (X): determinant of a square matrix", }, |
1
|
270 |
|
271 { "diag", 3, 1, builtin_diag, |
181
|
272 "diag (X [,k]): form/extract diagonals", }, |
1
|
273 |
|
274 { "disp", 3, 1, builtin_disp, |
181
|
275 "disp (X): display value", }, |
1
|
276 |
|
277 { "eig", 2, 1, builtin_eig, |
181
|
278 "eig (x) or [v, d] = eig (x): compute eigenvalues and eigenvectors of x", }, |
1
|
279 |
|
280 { "error", 2, 1, builtin_error, |
181
|
281 "error (\"message\"): print message and jump to top level", }, |
1
|
282 |
|
283 { "eval", 2, 1, builtin_eval, |
181
|
284 "eval (\"string\"): evaluate text as octave source", }, |
1
|
285 |
|
286 { "exist", 2, 1, builtin_exist, |
181
|
287 "exist (\"name\"): check if variable or file exists", }, |
1
|
288 |
|
289 { "exit", 1, 0, builtin_quit, |
181
|
290 "exit (): exit Octave gracefully", }, |
1
|
291 |
|
292 { "expm", 2, 1, builtin_expm, |
181
|
293 "expm (X): matrix exponential, e^A", }, |
1
|
294 |
|
295 { "eye", 3, 1, builtin_eye, |
181
|
296 "eye (n), eye (n, m), eye (X): create an identity matrix", }, |
1
|
297 |
|
298 { "fclose", 2, 1, builtin_fclose, |
181
|
299 "fclose (\"filename\" or filenum): close a file", }, |
1
|
300 |
|
301 { "feval", -1, 1, builtin_feval, |
181
|
302 "feval (\"name\", args, ...): evaluate first argument as function", }, |
1
|
303 |
|
304 { "fflush", 2, 1, builtin_fflush, |
181
|
305 "fflush (\"filename\" or filenum): flush buffered data to output file", }, |
1
|
306 |
|
307 { "fft", 2, 1, builtin_fft, |
181
|
308 "fft (X): fast fourier transform of a vector", }, |
1
|
309 |
|
310 { "fgets",3, 2, builtin_fgets, |
181
|
311 "[string, length] = fgets (\"filename\" or filenum, length): read a string from a file", }, |
1
|
312 |
|
313 { "find", -1, 1, builtin_find, |
181
|
314 "find (x): return vector of indices of nonzero elements", }, |
1
|
315 |
|
316 { "flops", 2, 1, builtin_flops, |
181
|
317 "flops (): count floating point operations", }, |
1
|
318 |
|
319 { "fopen", 3, 1, builtin_fopen, |
181
|
320 "filenum = fopen (\"filename\", \"mode\"): open a file\n\n\ |
|
321 Legal values for mode include:\n\n\ |
|
322 r : open text file for reading\n\ |
|
323 w : open text file for writing; discard previous contents if any\n\ |
|
324 a : append; open or create text file for writing at end of file\n\ |
|
325 r+ : open text file for update (i.e., reading and writing)\n\ |
|
326 w+ : create text file for update; discard previous contents if any\n\ |
|
327 a+ : append; open or create text file for update, writing at end\n\n\ |
|
328 Update mode permits reading from and writing to the same file.\n", }, |
1
|
329 |
|
330 { "fprintf", -1, 1, builtin_fprintf, |
181
|
331 "fprintf (\"file\", \"fmt\", ...)", }, |
1
|
332 |
|
333 { "freport", 1, 1, builtin_freport, |
181
|
334 "freport (): list open files and their status", }, |
1
|
335 |
|
336 { "frewind", 2, 1, builtin_frewind, |
181
|
337 "frewind (\"filename\" or filenum): set file position at beginning of file", }, |
1
|
338 |
|
339 { "fscanf", 3, -1, builtin_fscanf, |
181
|
340 "[a, b, c, ...] = fscanf (\"file\", \"fmt\")", }, |
1
|
341 |
|
342 { "fseek", 4, 1, builtin_fseek, |
181
|
343 "fseek (\"filename\" or filenum, offset [, origin]): set file position for reading or writing", }, |
1
|
344 |
|
345 { "fsolve", 5, 1, builtin_fsolve, |
|
346 "Solve nonlinear equations using Minpack. Usage:\n\ |
|
347 \n\ |
181
|
348 [x, info] = fsolve (\"f\", x0)\n\ |
1
|
349 \n\ |
|
350 Where the first argument is the name of the function to call to\n\ |
|
351 compute the vector of function values. It must have the form\n\ |
|
352 \n\ |
|
353 y = f (x) |
|
354 \n\ |
181
|
355 where y and x are vectors.", }, |
1
|
356 |
|
357 { "fsqp", 11, 3, builtin_fsqp, |
181
|
358 #if defined (FSQP_MISSING) |
|
359 "This function requires FSQP, which is not freely\n\ |
|
360 redistributable. For more information, read the file\n\ |
|
361 libcruft/fsqp/README.MISSING in the source distribution.", }, |
|
362 #else |
|
363 "[x, phi] = fsqp (x, \"phi\" [, lb, ub] [, lb, A, ub] [, lb, \"g\", ub])\n\n\ |
|
364 Groups of arguments surrounded in `[]' are optional, but\n\ |
|
365 must appear in the same relative order shown above.", }, |
|
366 #endif |
1
|
367 |
|
368 { "ftell", 2, 1, builtin_ftell, |
181
|
369 "position = ftell (\"filename\" or filenum): returns the current file position", }, |
1
|
370 |
|
371 { "getenv", 2, 1, builtin_getenv, |
181
|
372 "getenv (\"string\"): get environment variable values", }, |
1
|
373 |
31
|
374 { "givens", 3, 2, builtin_givens, |
181
|
375 "G = givens (x, y): compute orthogonal matrix G = [c s; -conj (s) c]\n\ |
|
376 such that G [x; y] = [*; 0] (x, y scalars)\n\n\ |
|
377 [c, s] = givens (x, y) returns the (c, s) values themselves.", }, |
31
|
378 |
|
379 |
1
|
380 { "hess", 2, 2, builtin_hess, |
181
|
381 "[P, H] = hess (A) or H = hess (A): Hessenberg decomposition", }, |
1
|
382 |
|
383 { "home", 1, 0, builtin_clc, |
181
|
384 "home (): clear screen", }, |
1
|
385 |
|
386 { "input", 3, 1, builtin_input, |
181
|
387 "input (\"prompt\" [, \"s\"]): prompt user for [string] input", }, |
1
|
388 |
|
389 { "ifft", 2, 1, builtin_ifft, |
181
|
390 "ifft (X): inverse fast fourier transform of a vector", }, |
1
|
391 |
|
392 { "inv", 2, 1, builtin_inv, |
181
|
393 "inv (X): inverse of a square matrix", }, |
1
|
394 |
|
395 { "inverse", 2, 1, builtin_inv, |
181
|
396 "inverse (X): inverse of a square matrix", }, |
1
|
397 |
195
|
398 { "is_global", 2, 1, builtin_is_global, |
|
399 "is_global (X): return 1 if the string X names a global variable", }, |
|
400 |
1
|
401 { "isstr", 2, 1, builtin_isstr, |
181
|
402 "isstr (X): return 1 if X is a string", }, |
1
|
403 |
|
404 { "keyboard", 2, 1, builtin_keyboard, |
181
|
405 "keyboard (\"prompt\"): maybe help in debugging M-files", }, |
1
|
406 |
|
407 { "logm", 2, 1, builtin_logm, |
181
|
408 "logm (x): matrix logarithm", }, |
1
|
409 |
181
|
410 { "lp_solve", 11, 3, builtin_lpsolve, |
|
411 "lp_solve (): solve linear programs using lp_solve.", }, |
1
|
412 |
|
413 { "lsode", 6, 1, builtin_lsode, |
181
|
414 "lsode (\"function_name\", x0, t_out, t_crit)\n\ |
1
|
415 \n\ |
|
416 The first argument is the name of the function to call to\n\ |
|
417 compute the vector of right hand sides. It must have the form\n\ |
|
418 \n\ |
|
419 xdot = f (x, t)\n\ |
|
420 \n\ |
181
|
421 where xdot and x are vectors and t is a scalar.\n", }, |
1
|
422 |
|
423 { "lu", 2, 3, builtin_lu, |
181
|
424 "[L, U, P] = lu (A): LU factorization", }, |
1
|
425 |
|
426 { "max", 3, 2, builtin_max, |
181
|
427 "max (x): maximum value(s) of a vector (matrix)", }, |
1
|
428 |
|
429 { "min", 3, 2, builtin_min, |
181
|
430 "min (x): minimum value(s) of a vector (matrix)", }, |
1
|
431 |
|
432 { "npsol", 11, 3, builtin_npsol, |
181
|
433 #if defined (NPSOL_MISSING) |
|
434 "This function requires NPSOL, which is not freely\n\ |
|
435 redistributable. For more information, read the file\n\ |
|
436 libcruft/npsol/README.MISSING in the source distribution.", }, |
|
437 #else |
|
438 "[x, obj, info, lambda] = npsol (x, \"phi\" [, lb, ub] [, lb, A, ub] [, lb, \"g\", ub])\n\n\ |
|
439 Groups of arguments surrounded in `[]' are optional, but\n\ |
|
440 must appear in the same relative order shown above.\n\ |
1
|
441 \n\ |
181
|
442 The second argument is a string containing the name of the objective\n\ |
|
443 function to call. The objective function must be of the form\n\ |
1
|
444 \n\ |
181
|
445 y = phi (x)\n\ |
1
|
446 \n\ |
181
|
447 where x is a vector and y is a scalar.", }, |
|
448 #endif |
1
|
449 |
|
450 { "ones", 3, 1, builtin_ones, |
181
|
451 "ones (n), ones (n, m), ones (x): create a matrix of all ones", }, |
1
|
452 |
|
453 { "pause", 1, 0, builtin_pause, |
181
|
454 "pause (seconds): suspend program execution", }, |
1
|
455 |
|
456 { "purge_tmp_files", 5, 1, builtin_purge_tmp_files, |
181
|
457 "delete temporary data files used for plotting", }, |
1
|
458 |
|
459 { "printf", -1, 1, builtin_printf, |
181
|
460 "printf (\"fmt\", ...)", }, |
1
|
461 |
|
462 { "prod", 2, 1, builtin_prod, |
181
|
463 "prod (X): products", }, |
1
|
464 |
|
465 { "pwd", 1, 0, builtin_pwd, |
181
|
466 "pwd (): print current working directory", }, |
1
|
467 |
|
468 { "qpsol", 9, 3, builtin_qpsol, |
181
|
469 #if defined (QPSOL_MISSING) |
|
470 "This function requires QPSOL, which is not freely\n\ |
|
471 redistributable. For more information, read the file\n\ |
|
472 libcruft/qpsol/README.MISSING in the source distribution.", }, |
|
473 #else |
|
474 "[x, obj, info, lambda] = qpsol (x, H, c [, lb, ub] [, lb, A, ub])\n\ |
1
|
475 \n\ |
|
476 Groups of arguments surrounded in `[]' are optional, but\n\ |
|
477 must appear in the same relative order shown above.", }, |
181
|
478 #endif |
1
|
479 |
|
480 { "qr", 2, 2, builtin_qr, |
181
|
481 "[q, r] = qr (X): form QR factorization of X", }, |
1
|
482 |
|
483 { "quad", 6, 3, builtin_quad, |
181
|
484 "[v, ier, nfun] = quad (\"f\", a, b [, tol] [, sing])\n\ |
1
|
485 \n\ |
|
486 Where the first argument is the name of the function to call to\n\ |
|
487 compute the value of the integrand. It must have the form\n\ |
|
488 \n\ |
|
489 y = f (x) |
|
490 \n\ |
|
491 where y and x are scalars.\n\ |
|
492 \n\ |
|
493 The second and third arguments are limits of integration. Either or\n\ |
|
494 both may be infinite. The optional argument tol specifies the desired\n\ |
|
495 accuracy of the result. The optional argument sing is a vector of\n\ |
181
|
496 at which the integrand is singular.\n", }, |
1
|
497 |
|
498 { "quit", 1, 0, builtin_quit, |
181
|
499 "quit (): exit Octave gracefully", }, |
1
|
500 |
45
|
501 { "qzval", 3, 1, builtin_qzval, |
181
|
502 "x = qzval (A,B): compute generalized eigenvalues of \n\ |
|
503 the matrix pencil (A - lambda B). A and B must be real matrices.", }, |
45
|
504 |
1
|
505 { "rand", 2, 1, builtin_rand, |
181
|
506 "rand -- generate a random value\n\ |
|
507 rand (n) -- generate N x N matrix\n\ |
|
508 rand (A) -- generate matrix the size of A\n\ |
|
509 rand (n, m) -- generate N x M matrix\n\ |
|
510 rand (\"dist\") -- get current distribution\n\ |
|
511 rand (\"distribution\") -- set distribution\n\ |
|
512 rand (\"seed\") -- get current seed\n\ |
|
513 rand (\"seed\", n) -- set seed", }, |
1
|
514 |
|
515 { "replot", 1, 0, builtin_replot, |
181
|
516 "replot (): redisplay current plot", }, |
1
|
517 |
|
518 { "scanf", 2, -1, builtin_scanf, |
181
|
519 "[a, b, c, ...] = scanf (\"fmt\")", }, |
1
|
520 |
|
521 { "setstr", 2, 1, builtin_setstr, |
181
|
522 "setstr (v): convert a vector to a string", }, |
1
|
523 |
|
524 { "shell_cmd", 2, 1, builtin_shell_command, |
181
|
525 "shell_cmd (string [, return_output]): execute shell commands", }, |
1
|
526 |
|
527 { "schur", 3, 2, builtin_schur, |
181
|
528 "[U, S] = schur (A) or S = schur (A)\n\n\ |
|
529 or, for ordered Schur:\n\n\ |
|
530 [U, S] = schur (A, \"A, D, or U\") or S = schur (A, \"A, D, or U\")\n\ |
|
531 where:\n\n\ |
|
532 A = continuous time poles\n\ |
|
533 D = discrete time poles\n\ |
|
534 U = unordered schur (default)", }, |
|
535 |
1
|
536 |
|
537 { "size", 2, 1, builtin_size, |
181
|
538 "[m, n] = size (x): return rows and columns of X", }, |
1
|
539 |
|
540 { "sort", 2, 2, builtin_sort, |
181
|
541 "[s, i] = sort (x): sort the columns of x, optionally return sort index", }, |
1
|
542 |
|
543 { "sqrtm", 2, 1, builtin_sqrtm, |
181
|
544 "sqrtm (x): matrix sqrt", }, |
1
|
545 |
|
546 { "sprintf", -1, 1, builtin_sprintf, |
181
|
547 "s = sprintf (\"fmt\", ...)", }, |
1
|
548 |
|
549 { "sscanf", 3, -1, builtin_sscanf, |
181
|
550 "[a, b, c, ...] = sscanf (string, \"fmt\")", }, |
1
|
551 |
|
552 { "sum", 2, 1, builtin_sum, |
181
|
553 "sum (X): sum of elements", }, |
1
|
554 |
|
555 { "sumsq", 2, 1, builtin_sumsq, |
181
|
556 "sumsq (X): sum of squares of elements", }, |
1
|
557 |
|
558 { "svd", 2, 3, builtin_svd, |
181
|
559 "s = svd (x) or [u, s, v] = svd (x): return SVD of x", }, |
1
|
560 |
38
|
561 { "syl", 4, 1, builtin_syl, |
181
|
562 "X = syl (A, B, C): solve the Sylvester equation A X + X B + C = 0", }, |
38
|
563 |
210
|
564 { "va_arg", 1, 1, builtin_va_arg, |
|
565 "va_arg (): return next argument in function taking varible\n\ |
|
566 number of parameters", }, |
|
567 |
|
568 { "va_start", 1, 0, builtin_va_start, |
|
569 "va_start (): reset the pointer to the list of optional arguments\n\ |
|
570 to the beginning", }, |
|
571 |
1
|
572 { "warranty", 1, 0, builtin_warranty, |
181
|
573 "warranty (): describe copying conditions", }, |
1
|
574 |
|
575 { "zeros", 3, 1, builtin_zeros, |
181
|
576 "zeros (n), zeros (n, m), zeros (x): create a matrix of all zeros", }, |
1
|
577 |
|
578 { NULL, -1, -1, NULL, NULL, }, |
|
579 }; |
|
580 |
|
581 // This is a lie. Some of these get reassigned to be numeric |
|
582 // variables. See below. |
|
583 |
|
584 static builtin_string_variables string_variables[] = |
|
585 { |
195
|
586 { "EDITOR", "??", sv_editor, |
|
587 "name of the editor to be invoked by the edit_history command", }, |
|
588 |
1
|
589 { "I", "??", NULL, |
181
|
590 "sqrt (-1)", }, |
1
|
591 |
|
592 { "Inf", "??", NULL, |
181
|
593 "infinity", }, |
1
|
594 |
191
|
595 { "INFO_FILE", "??", sv_info_file, |
|
596 "name of the Octave info file", }, |
|
597 |
1
|
598 { "J", "??", NULL, |
181
|
599 "sqrt (-1)", }, |
1
|
600 |
|
601 #if defined (HAVE_ISNAN) |
|
602 { "NaN", "??", NULL, |
181
|
603 "not a number", }, |
1
|
604 #endif |
|
605 |
|
606 { "LOADPATH", "??", sv_loadpath, |
181
|
607 "colon separated list of directories to search for scripts", }, |
1
|
608 |
|
609 { "PAGER", "??", sv_pager_binary, |
181
|
610 "path to pager binary", }, |
1
|
611 |
|
612 { "PS1", "\\s:\\#> ", sv_ps1, |
181
|
613 "primary prompt string", }, |
1
|
614 |
|
615 { "PS2", "> ", sv_ps2, |
181
|
616 "secondary prompt string", }, |
1
|
617 |
|
618 { "PWD", "??PWD??", sv_pwd, |
181
|
619 "current working directory", }, |
1
|
620 |
|
621 { "SEEK_SET", "??", NULL, |
181
|
622 "used with fseek to position file relative to the beginning", }, |
1
|
623 |
|
624 { "SEEK_CUR", "??", NULL, |
181
|
625 "used with fseek to position file relative to the current position", }, |
1
|
626 |
|
627 { "SEEK_END", "??", NULL, |
181
|
628 "used with fseek to position file relative to the end", }, |
1
|
629 |
|
630 { "do_fortran_indexing", "false", do_fortran_indexing, |
181
|
631 "allow single indices for matrices", }, |
1
|
632 |
|
633 { "empty_list_elements_ok", "warn", empty_list_elements_ok, |
181
|
634 "ignore the empty element in expressions like `a = [[], 1]'", }, |
1
|
635 |
|
636 { "eps", "??", NULL, |
181
|
637 "machine precision", }, |
1
|
638 |
|
639 { "gnuplot_binary", "gnuplot", sv_gnuplot_binary, |
181
|
640 "path to gnuplot binary", }, |
1
|
641 |
|
642 { "i", "??", NULL, |
181
|
643 "sqrt (-1)", }, |
1
|
644 |
195
|
645 { "ignore_function_time_stamp", "system", ignore_function_time_stamp, |
|
646 "don't check to see if M-files have changed since they were last\n\ |
|
647 compiled. Possible values are \"system\" and \"all\"", }, |
|
648 |
1
|
649 { "implicit_str_to_num_ok", "false", implicit_str_to_num_ok, |
181
|
650 "allow implicit string to number conversion", }, |
1
|
651 |
|
652 { "inf", "??", NULL, |
181
|
653 "infinity", }, |
1
|
654 |
|
655 { "j", "??", NULL, |
181
|
656 "sqrt (-1)", }, |
1
|
657 |
|
658 #if defined (HAVE_ISNAN) |
|
659 { "nan", "??", NULL, |
181
|
660 "not a number", }, |
1
|
661 #endif |
|
662 |
|
663 { "ok_to_lose_imaginary_part", "warn", ok_to_lose_imaginary_part, |
181
|
664 "silently convert from complex to real by dropping imaginary part", }, |
1
|
665 |
|
666 { "output_max_field_width", "??", set_output_max_field_width, |
181
|
667 "maximum width of an output field for numeric output", }, |
1
|
668 |
|
669 { "output_precision", "??", set_output_precision, |
181
|
670 "number of significant figures to display for numeric output", }, |
1
|
671 |
|
672 { "page_screen_output", "true", page_screen_output, |
181
|
673 "if possible, send output intended for the screen through the pager", }, |
1
|
674 |
|
675 { "pi", "??", NULL, |
181
|
676 "ratio of the circumference of a circle to its diameter", }, |
1
|
677 |
|
678 { "prefer_column_vectors", "true", prefer_column_vectors, |
181
|
679 "prefer column/row vectors", }, |
1
|
680 |
|
681 { "prefer_zero_one_indexing", "false", prefer_zero_one_indexing, |
181
|
682 "when there is a conflict, prefer zero-one style indexing", }, |
1
|
683 |
|
684 { "print_answer_id_name", "true", print_answer_id_name, |
181
|
685 "set output style to print `var_name = ...'", }, |
1
|
686 |
|
687 { "print_empty_dimensions", "true", print_empty_dimensions, |
181
|
688 "also print dimensions of empty matrices", }, |
1
|
689 |
|
690 { "propagate_empty_matrices", "true", propagate_empty_matrices, |
181
|
691 "operations on empty matrices return an empty matrix, not an error", }, |
1
|
692 |
|
693 { "resize_on_range_error", "true", resize_on_range_error, |
181
|
694 "enlarge matrices on assignment", }, |
1
|
695 |
|
696 { "return_last_computed_value", "false", return_last_computed_value, |
|
697 "if a function does not return any values explicitly, return the\n\ |
181
|
698 last computed value", }, |
1
|
699 |
|
700 { "silent_functions", "false", silent_functions, |
181
|
701 "suppress printing results in called functions", }, |
1
|
702 |
|
703 { "split_long_rows", "true", split_long_rows, |
181
|
704 "split long matrix rows instead of wrapping", }, |
1
|
705 |
|
706 { "stdin", "??", NULL, |
181
|
707 "file number of the standard input stream", }, |
1
|
708 |
|
709 { "stdout", "??", NULL, |
181
|
710 "file number of the standard output stream", }, |
1
|
711 |
|
712 { "stderr", "??", NULL, |
181
|
713 "file number of the standard error stream", }, |
1
|
714 |
|
715 { "treat_neg_dim_as_zero", "false", treat_neg_dim_as_zero, |
181
|
716 "convert negative dimensions to zero", }, |
1
|
717 |
|
718 { "warn_assign_as_truth_value", "true", warn_assign_as_truth_value, |
181
|
719 "produce warning for assignments used as truth values", }, |
1
|
720 |
|
721 { "warn_comma_in_global_decl", "true", warn_comma_in_global_decl, |
181
|
722 "produce warning for commas in global declarations", }, |
1
|
723 |
|
724 { "warn_divide_by_zero", "true", warn_divide_by_zero, |
181
|
725 "on IEEE machines, allow divide by zero errors to be suppressed", }, |
1
|
726 |
|
727 { NULL, NULL, NULL, NULL, }, |
|
728 }; |
|
729 |
|
730 void |
|
731 install_builtins (void) |
|
732 { |
|
733 // So that the clear function can't delete other builtin variables and |
|
734 // functions, they are given eternal life. |
|
735 |
|
736 builtin_mapper_functions *mfptr = mapper_functions; |
|
737 while (mfptr->name != (char *) NULL) |
|
738 { |
195
|
739 install_builtin_mapper_function (mfptr); |
1
|
740 mfptr++; |
|
741 } |
|
742 |
|
743 builtin_text_functions *tfptr = text_functions; |
|
744 while (tfptr->name != (char *) NULL) |
|
745 { |
195
|
746 install_builtin_text_function (tfptr); |
1
|
747 tfptr++; |
|
748 } |
|
749 |
|
750 builtin_general_functions *gfptr = general_functions; |
|
751 while (gfptr->name != (char *) NULL) |
|
752 { |
195
|
753 install_builtin_general_function (gfptr); |
1
|
754 gfptr++; |
|
755 } |
|
756 |
|
757 // Most built-in variables are not protected because the user should |
|
758 // be able to redefine them. |
|
759 |
|
760 builtin_string_variables *svptr = string_variables; |
|
761 while (svptr->name != (char *) NULL) |
|
762 { |
195
|
763 install_builtin_variable (svptr); |
1
|
764 svptr++; |
|
765 } |
|
766 |
|
767 // IMPORTANT: Always create a new tree_constant for each variable. |
|
768 |
|
769 tree_constant *tmp = NULL_TREE_CONST; |
195
|
770 bind_builtin_variable ("ans", tmp); |
1
|
771 |
|
772 Complex ctmp (0.0, 1.0); |
|
773 tmp = new tree_constant (ctmp); |
195
|
774 bind_builtin_variable ("I", tmp, 1, 1); |
1
|
775 |
|
776 tmp = new tree_constant (ctmp); |
195
|
777 bind_builtin_variable ("J", tmp, 1, 1); |
1
|
778 |
|
779 // Let i and j be functions so they can be redefined without being |
|
780 // wiped out. |
|
781 |
|
782 tmp = new tree_constant (ctmp); |
195
|
783 install_builtin_variable_as_function ("i", tmp, 1, 1); |
1
|
784 |
|
785 tmp = new tree_constant (ctmp); |
195
|
786 install_builtin_variable_as_function ("j", tmp, 1, 1); |
1
|
787 |
|
788 tmp = new tree_constant (get_working_directory ("initialize_globals")); |
195
|
789 bind_builtin_variable ("PWD", tmp, 1, 1); |
1
|
790 |
|
791 tmp = new tree_constant (load_path); |
195
|
792 bind_builtin_variable ("LOADPATH", tmp, 0, 1); |
1
|
793 |
191
|
794 tmp = new tree_constant (info_file); |
195
|
795 bind_builtin_variable ("INFO_FILE", tmp, 0, 1); |
|
796 |
|
797 tmp = new tree_constant (editor); |
|
798 bind_builtin_variable ("EDITOR", tmp, 0, 1); |
191
|
799 |
1
|
800 tmp = new tree_constant (default_pager ()); |
195
|
801 bind_builtin_variable ("PAGER", tmp, 0, 1); |
1
|
802 |
|
803 tmp = new tree_constant (0.0); |
195
|
804 bind_builtin_variable ("SEEK_SET", tmp, 0, 1); |
1
|
805 |
|
806 tmp = new tree_constant (1.0); |
195
|
807 bind_builtin_variable ("SEEK_CUR", tmp, 0, 1); |
1
|
808 |
|
809 tmp = new tree_constant (2.0); |
195
|
810 bind_builtin_variable ("SEEK_END", tmp, 0, 1); |
1
|
811 |
|
812 tmp = new tree_constant (DBL_EPSILON); |
195
|
813 bind_builtin_variable ("eps", tmp, 1, 1); |
1
|
814 |
|
815 tmp = new tree_constant (10.0); |
195
|
816 bind_builtin_variable ("output_max_field_width", tmp, 0, 1); |
1
|
817 |
|
818 tmp = new tree_constant (5.0); |
195
|
819 bind_builtin_variable ("output_precision", tmp, 0, 1); |
1
|
820 |
|
821 tmp = new tree_constant (4.0 * atan (1.0)); |
195
|
822 bind_builtin_variable ("pi", tmp, 1, 1); |
1
|
823 |
|
824 tmp = new tree_constant (0.0); |
195
|
825 bind_builtin_variable ("stdin", tmp, 1, 1); |
1
|
826 |
|
827 tmp = new tree_constant (1.0); |
195
|
828 bind_builtin_variable ("stdout", tmp, 1, 1); |
1
|
829 |
|
830 tmp = new tree_constant (2.0); |
195
|
831 bind_builtin_variable ("stderr", tmp, 1, 1); |
1
|
832 |
169
|
833 // If using 1.0 / 0.0 doesn't work, you might also try using a very |
|
834 // large constant like 1.0e100000. |
|
835 |
1
|
836 #if defined (HAVE_ISINF) || defined (HAVE_FINITE) |
|
837 #ifdef linux |
169
|
838 double tmp_inf = HUGE_VAL; |
1
|
839 #else |
169
|
840 double tmp_inf = 1.0 / 0.0; |
1
|
841 #endif |
169
|
842 |
|
843 tmp = new tree_constant (tmp_inf); |
195
|
844 bind_builtin_variable ("Inf", tmp, 1, 1); |
1
|
845 |
169
|
846 tmp = new tree_constant (tmp_inf); |
195
|
847 bind_builtin_variable ("inf", tmp, 1, 1); |
1
|
848 |
|
849 #else |
|
850 |
|
851 // This is sort of cheesy, but what can we do, other than blowing it |
|
852 // off completely, or writing an entire IEEE emulation package? |
|
853 |
|
854 tmp = new tree_constant (DBL_MAX); |
195
|
855 bind_builtin_variable ("Inf", tmp, 1, 1); |
1
|
856 |
|
857 tmp = new tree_constant (DBL_MAX); |
195
|
858 bind_builtin_variable ("inf", tmp, 1, 1); |
1
|
859 #endif |
|
860 |
195
|
861 // If 0.0 / 0.0 fails to produce a NaN, you might also try |
|
862 // something like Inf / Inf. |
169
|
863 |
1
|
864 #if defined (HAVE_ISNAN) |
|
865 #ifdef linux |
169
|
866 double tmp_nan = NAN; |
1
|
867 #else |
195
|
868 double tmp_nan = 0.0 / 0.0; |
1
|
869 #endif |
169
|
870 |
|
871 tmp = new tree_constant (tmp_nan); |
195
|
872 bind_builtin_variable ("NaN", tmp, 1, 1); |
1
|
873 |
169
|
874 tmp = new tree_constant (tmp_nan); |
195
|
875 bind_builtin_variable ("nan", tmp, 1, 1); |
1
|
876 #endif |
|
877 } |
|
878 |
|
879 int |
164
|
880 is_text_function_name (const char *s) |
1
|
881 { |
|
882 int retval = 0; |
|
883 |
|
884 builtin_text_functions *tfptr = text_functions; |
|
885 while (tfptr->name != (char *) NULL) |
|
886 { |
|
887 if (strcmp (tfptr->name, s) == 0) |
|
888 { |
|
889 retval = 1; |
|
890 break; |
|
891 } |
|
892 tfptr++; |
|
893 } |
|
894 |
|
895 return retval; |
|
896 } |
|
897 |
|
898 help_list * |
|
899 builtin_mapper_functions_help (void) |
|
900 { |
|
901 int count = 0; |
|
902 builtin_mapper_functions *mfptr; |
|
903 |
|
904 mfptr = mapper_functions; |
|
905 while (mfptr->name != (char *) NULL) |
|
906 { |
|
907 count++; |
|
908 mfptr++; |
|
909 } |
|
910 |
|
911 if (count == 0) |
|
912 return (help_list *) NULL; |
|
913 |
|
914 help_list *hl = new help_list [count+1]; |
|
915 |
|
916 int i = 0; |
|
917 mfptr = mapper_functions; |
|
918 while (mfptr->name != (char *) NULL) |
|
919 { |
|
920 hl[i].name = mfptr->name; |
|
921 hl[i].help = mfptr->help_string; |
|
922 i++; |
|
923 mfptr++; |
|
924 } |
|
925 |
|
926 hl[count].name = (char *) NULL; |
|
927 hl[count].help = (char *) NULL; |
|
928 |
|
929 return hl; |
|
930 } |
|
931 |
|
932 help_list * |
|
933 builtin_general_functions_help (void) |
|
934 { |
|
935 int count = 0; |
|
936 builtin_general_functions *gfptr; |
|
937 |
|
938 gfptr = general_functions; |
|
939 while (gfptr->name != (char *) NULL) |
|
940 { |
|
941 count++; |
|
942 gfptr++; |
|
943 } |
|
944 |
|
945 if (count == 0) |
|
946 return (help_list *) NULL; |
|
947 |
|
948 help_list *hl = new help_list [count+1]; |
|
949 |
|
950 int i = 0; |
|
951 gfptr = general_functions; |
|
952 while (gfptr->name != (char *) NULL) |
|
953 { |
|
954 hl[i].name = gfptr->name; |
|
955 hl[i].help = gfptr->help_string; |
|
956 i++; |
|
957 gfptr++; |
|
958 } |
|
959 |
|
960 hl[count].name = (char *) NULL; |
|
961 hl[count].help = (char *) NULL; |
|
962 |
|
963 return hl; |
|
964 } |
|
965 |
|
966 help_list * |
|
967 builtin_text_functions_help (void) |
|
968 { |
|
969 int count = 0; |
|
970 builtin_text_functions *tfptr; |
|
971 |
|
972 tfptr = text_functions; |
|
973 while (tfptr->name != (char *) NULL) |
|
974 { |
|
975 count++; |
|
976 tfptr++; |
|
977 } |
|
978 |
|
979 if (count == 0) |
|
980 return (help_list *) NULL; |
|
981 |
|
982 help_list *hl = new help_list [count+1]; |
|
983 |
|
984 int i = 0; |
|
985 tfptr = text_functions; |
|
986 while (tfptr->name != (char *) NULL) |
|
987 { |
|
988 hl[i].name = tfptr->name; |
|
989 hl[i].help = tfptr->help_string; |
|
990 i++; |
|
991 tfptr++; |
|
992 } |
|
993 |
|
994 hl[count].name = (char *) NULL; |
|
995 hl[count].help = (char *) NULL; |
|
996 |
|
997 return hl; |
|
998 } |
|
999 |
|
1000 help_list * |
|
1001 builtin_variables_help (void) |
|
1002 { |
|
1003 int count = 0; |
|
1004 builtin_string_variables *svptr; |
|
1005 |
|
1006 svptr = string_variables; |
|
1007 while (svptr->name != (char *) NULL) |
|
1008 { |
|
1009 count++; |
|
1010 svptr++; |
|
1011 } |
|
1012 |
|
1013 if (count == 0) |
|
1014 return (help_list *) NULL; |
|
1015 |
|
1016 help_list *hl = new help_list [count+1]; |
|
1017 |
|
1018 int i = 0; |
|
1019 svptr = string_variables; |
|
1020 while (svptr->name != (char *) NULL) |
|
1021 { |
|
1022 hl[i].name = svptr->name; |
|
1023 hl[i].help = svptr->help_string; |
|
1024 i++; |
|
1025 svptr++; |
|
1026 } |
|
1027 |
|
1028 hl[count].name = (char *) NULL; |
|
1029 hl[count].help = (char *) NULL; |
|
1030 |
|
1031 return hl; |
|
1032 } |
|
1033 |
181
|
1034 int |
|
1035 help_from_list (ostrstream& output_buf, const help_list *list, |
|
1036 const char *string, int usage) |
|
1037 { |
|
1038 char *name; |
|
1039 while ((name = list->name) != (char *) NULL) |
|
1040 { |
|
1041 if (strcmp (name, string) == 0) |
|
1042 { |
|
1043 if (usage) |
|
1044 output_buf << "\nusage: "; |
|
1045 else |
|
1046 { |
|
1047 output_buf << "\n*** " << string << ":\n\n"; |
|
1048 } |
|
1049 |
|
1050 output_buf << list->help << "\n"; |
|
1051 |
|
1052 return 1; |
|
1053 } |
|
1054 list++; |
|
1055 } |
|
1056 return 0; |
|
1057 } |
|
1058 |
|
1059 void |
|
1060 additional_help_message (ostrstream& output_buf) |
|
1061 { |
|
1062 output_buf |
|
1063 << "\n" |
|
1064 << "Additional help for builtin functions, operators, and variables\n" |
|
1065 << "is available in the on-line version of the manual.\n" |
|
1066 << "\n" |
|
1067 << "Use the command `help -i <topic>' to search the manual index.\n"; |
|
1068 } |
|
1069 |
|
1070 void |
|
1071 print_usage (const char *string) |
|
1072 { |
|
1073 ostrstream output_buf; |
|
1074 |
|
1075 help_list *gf_help_list = builtin_general_functions_help (); |
|
1076 help_list *tf_help_list = builtin_text_functions_help (); |
|
1077 help_list *mf_help_list = builtin_mapper_functions_help (); |
|
1078 |
|
1079 if (help_from_list (output_buf, gf_help_list, string, 1) |
|
1080 || help_from_list (output_buf, tf_help_list, string, 1) |
|
1081 || help_from_list (output_buf, mf_help_list, string, 1)) |
|
1082 { |
|
1083 additional_help_message (output_buf); |
|
1084 output_buf << ends; |
|
1085 maybe_page_output (output_buf); |
|
1086 } |
|
1087 } |
|
1088 |
1
|
1089 /* |
|
1090 ;;; Local Variables: *** |
|
1091 ;;; mode: C++ *** |
|
1092 ;;; page-delimiter: "^/\\*" *** |
|
1093 ;;; End: *** |
|
1094 */ |