Mercurial > octave-nkf
annotate doc/interpreter/tips.txi @ 10846:a4f482e66b65
Grammarcheck more of the documentation.
Use @noindent macro appropriately.
Limit line length to 80 characters.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 01 Aug 2010 20:22:17 -0700 |
parents | 322f43e0e170 |
children | fd0a3ac60b0e |
rev | line source |
---|---|
8920 | 1 @c Copyright (C) 1996, 1997, 1999, 2002, 2004, 2005, 2007, 2008, |
2 @c 2009 John W. Eaton | |
7018 | 3 @c |
4 @c This file is part of Octave. | |
5 @c | |
6 @c Octave is free software; you can redistribute it and/or modify it | |
7 @c under the terms of the GNU General Public License as published by the | |
8 @c Free Software Foundation; either version 3 of the License, or (at | |
9 @c your option) any later version. | |
10 @c | |
11 @c Octave is distributed in the hope that it will be useful, but WITHOUT | |
12 @c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
13 @c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
14 @c for more details. | |
15 @c | |
16 @c You should have received a copy of the GNU General Public License | |
17 @c along with Octave; see the file COPYING. If not, see | |
18 @c <http://www.gnu.org/licenses/>. | |
3294 | 19 |
9032
349616d9c38e
Cleanup top-level documentation menu in octave.texi
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
20 @node Tips and Standards |
3294 | 21 @appendix Tips and Standards |
22 @cindex tips | |
23 @cindex standards of coding style | |
24 @cindex coding standards | |
25 | |
26 This chapter describes no additional features of Octave. Instead it | |
27 gives advice on making effective use of the features described in the | |
28 previous chapters. | |
29 | |
30 @menu | |
31 * Style Tips:: Writing clean and robust programs. | |
32 * Coding Tips:: Making code run faster. | |
33 * Comment Tips:: Conventions for writing comments. | |
34 * Function Headers:: Standard headers for functions. | |
6574 | 35 * Documentation Tips:: Writing readable documentation strings. |
3294 | 36 @end menu |
37 | |
4167 | 38 @node Style Tips |
3294 | 39 @section Writing Clean Octave Programs |
40 | |
41 Here are some tips for avoiding common errors in writing Octave code | |
42 intended for widespread use: | |
43 | |
44 @itemize @bullet | |
45 @item | |
46 Since all global variables share the same name space, and all functions | |
47 share another name space, you should choose a short word to distinguish | |
48 your program from other Octave programs. Then take care to begin the | |
49 names of all global variables, constants, and functions with the chosen | |
50 prefix. This helps avoid name conflicts. | |
51 | |
52 If you write a function that you think ought to be added to Octave under | |
53 a certain name, such as @code{fiddle_matrix}, don't call it by that name | |
54 in your program. Call it @code{mylib_fiddle_matrix} in your program, | |
5041 | 55 and send mail to @email{maintainers@@octave.org} suggesting that it |
3294 | 56 be added to Octave. If and when it is, the name can be changed easily |
57 enough. | |
58 | |
59 If one prefix is insufficient, your package may use two or three | |
60 alternative common prefixes, so long as they make sense. | |
61 | |
62 Separate the prefix from the rest of the symbol name with an underscore | |
63 @samp{_}. This will be consistent with Octave itself and with most | |
64 Octave programs. | |
65 | |
66 @item | |
67 When you encounter an error condition, call the function @code{error} | |
68 (or @code{usage}). The @code{error} and @code{usage} functions do not | |
69 return. | |
70 @xref{Errors}. | |
71 | |
72 @item | |
73 Please put a copyright notice on the file if you give copies to anyone. | |
74 Use the same lines that appear at the top of the function files | |
75 distributed with Octave. If you have not signed papers to assign the | |
76 copyright to anyone else, then place your name in the copyright notice. | |
77 @end itemize | |
78 | |
4167 | 79 @node Coding Tips |
3294 | 80 @section Tips for Making Code Run Faster. |
81 @cindex execution speed | |
82 @cindex speedups | |
83 | |
84 Here are some ways of improving the execution speed of Octave programs. | |
85 | |
86 @itemize @bullet | |
87 @item | |
9758
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
88 Vectorize loops. For instance, rather than |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
89 |
9356 | 90 @example |
9758
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
91 @group |
9356 | 92 for i = 1:n-1 |
93 a(i) = b(i+1) - b(i); | |
94 endfor | |
9758
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
95 @end group |
9356 | 96 @end example |
97 | |
10846
a4f482e66b65
Grammarcheck more of the documentation.
Rik <octave@nomad.inbox5.com>
parents:
10828
diff
changeset
|
98 @noindent |
9356 | 99 write |
100 | |
101 @example | |
102 a = b(2:n) - b(1:n-1); | |
103 @end example | |
104 | |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
105 This is especially important for loops with "cheap" bodies. Often it suffices |
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
106 to vectorize just the innermost loop to get acceptable performance. A general |
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
107 rule of thumb is that the "order" of the vectorized body should be greater or |
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
108 equal to the "order" of the enclosing loop. |
9356 | 109 |
110 @item | |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
111 Use built-in and library functions if possible. Built-in and compiled functions |
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
112 are very fast. Even with a m-file library function, chances are good that it is |
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
113 already optimized, or will be optimized more in a future release. |
9356 | 114 |
10812 | 115 For instance, even better than |
116 | |
117 @example | |
118 a = b(2:n) - b(1:n-1); | |
119 @end example | |
120 | |
10846
a4f482e66b65
Grammarcheck more of the documentation.
Rik <octave@nomad.inbox5.com>
parents:
10828
diff
changeset
|
121 @noindent |
10812 | 122 is |
123 | |
124 @example | |
125 a = diff (b); | |
126 @end example | |
127 | |
128 | |
9356 | 129 @item |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
130 Avoid computing costly intermediate results multiple times. Octave currently |
9356 | 131 does not eliminate common subexpressions. |
9486 | 132 Also, certain internal computation results are cached for variables. |
133 For instance, if a matrix variable is used multiple times as an index, | |
134 checking the indices (and internal conversion to integers) is only done once. | |
3294 | 135 |
136 @item | |
9758
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
137 Be aware of lazy copies (copy-on-write). When a copy of an object |
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
138 is created, the data is not immediately copied, but rather shared. The actual |
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
139 copying is postponed until the copied data needs to be modified. For example: |
9356 | 140 |
141 @example | |
9758
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
142 @group |
9356 | 143 a = zeros (1000); # create a 1000x1000 matrix |
144 b = a; # no copying done here | |
145 b(1) = 1; # copying done here | |
9758
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
146 @end group |
9356 | 147 @end example |
148 | |
149 Lazy copying applies to whole Octave objects such as matrices, cells, struct, | |
150 and also individual cell or struct elements (not array elements). | |
151 | |
152 Additionally, index expressions also use lazy copying when Octave can determine | |
9758
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
153 that the indexed portion is contiguous in memory. For example: |
9356 | 154 |
155 @example | |
9758
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
156 @group |
9356 | 157 a = zeros (1000); # create a 1000x1000 matrix |
158 b = a(:,10:100); # no copying done here | |
159 b = a(10:100,:); # copying done here | |
9758
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
160 @end group |
9356 | 161 @end example |
162 | |
163 This applies to arrays (matrices), cell arrays, and structs indexed using (). | |
164 Index expressions generating cs-lists can also benefit of shallow copying | |
9758
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
165 in some cases. In particular, when @var{a} is a struct array, expressions like |
9356 | 166 @code{@{a.x@}, @{a(:,2).x@}} will use lazy copying, so that data can be shared |
167 between a struct array and a cell array. | |
168 | |
169 Most indexing expressions do not live longer than their `parent' objects. | |
170 In rare cases, however, a lazily copied slice outlasts its parent, in which | |
171 case it becomes orphaned, still occupying unnecessarily more memory than needed. | |
172 To provide a remedy working in most real cases, | |
173 Octave checks for orphaned lazy slices at certain situations, when a value | |
174 is stored into a "permanent" location, such as a named variable or cell or | |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
175 struct element, and possibly economizes them. For example: |
9356 | 176 |
177 @example | |
9758
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
178 @group |
9356 | 179 a = zeros (1000); # create a 1000x1000 matrix |
180 b = a(:,10:100); # lazy slice | |
181 a = []; # the original a array is still allocated | |
182 c@{1@} = b; # b is reallocated at this point | |
9758
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
183 @end group |
9356 | 184 @end example |
3294 | 185 |
186 @item | |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
187 Avoid deep recursion. Function calls to m-file functions carry a relatively |
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
188 significant overhead, so rewriting a recursion as a loop often helps. Also, |
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
189 note that the maximum level of recursion is limited. |
9356 | 190 |
191 @item | |
9758
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
192 Avoid resizing matrices unnecessarily. When building a single result |
3294 | 193 matrix from a series of calculations, set the size of the result matrix |
194 first, then insert values into it. Write | |
195 | |
196 @example | |
197 @group | |
198 result = zeros (big_n, big_m) | |
199 for i = over:and_over | |
200 r1 = @dots{} | |
201 r2 = @dots{} | |
202 result (r1, r2) = new_value (); | |
203 endfor | |
204 @end group | |
205 @end example | |
206 | |
207 @noindent | |
208 instead of | |
209 | |
210 @example | |
211 @group | |
212 result = []; | |
213 for i = ever:and_ever | |
214 result = [ result, new_value() ]; | |
215 endfor | |
216 @end group | |
217 @end example | |
218 | |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
219 Sometimes the number of items can't be computed in advance, and stack-like |
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
220 operations are needed. When elements are being repeatedly inserted at/removed |
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
221 from the end of an array, Octave detects it as stack usage and attempts to use a |
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
222 smarter memory management strategy pre-allocating the array in bigger chunks. |
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
223 Likewise works for cell and struct arrays. |
9356 | 224 |
225 @example | |
9758
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
226 @group |
9356 | 227 a = []; |
228 while (condition) | |
229 @dots{} | |
230 a(end+1) = value; # "push" operation | |
231 @dots{} | |
232 a(end) = []; # "pop" operation | |
233 @dots{} | |
234 endwhile | |
9758
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
235 @end group |
9356 | 236 @end example |
237 | |
3294 | 238 @item |
9758
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
239 Use @code{cellfun} intelligently. The @code{cellfun} function is a useful tool |
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
240 for avoiding loops. @xref{Processing Data in Cell Arrays}. |
10284 | 241 @code{cellfun} is often used with anonymous function handles; however, calling |
9356 | 242 an anonymous function involves an overhead quite comparable to the overhead |
9758
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
243 of an m-file function. Passing a handle to a built-in function is faster, |
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
244 because the interpreter is not involved in the internal loop. For example: |
9356 | 245 |
246 @example | |
9758
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
247 @group |
9356 | 248 a = @{@dots{}@} |
249 v = cellfun (@@(x) det(x), a); # compute determinants | |
250 v = cellfun (@@det, a); # faster | |
9758
09da0bd91412
Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents:
9486
diff
changeset
|
251 @end group |
9356 | 252 @end example |
253 | |
254 @item | |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
255 Octave includes a number of other functions that can replace common types of |
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
256 loops, including @code{bsxfun}, @code{arrayfun}, @code{structfun}, |
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
257 @code{accumarray}. These functions can take an arbitrary function as a handle. |
10812 | 258 Be sure to get familiar with them if you want to become an Octave expert. |
10284 | 259 |
260 @item | |
9356 | 261 Avoid calling @code{eval} or @code{feval} excessively, because |
3294 | 262 they require Octave to parse input or look up the name of a function in |
263 the symbol table. | |
264 | |
265 If you are using @code{eval} as an exception handling mechanism and not | |
266 because you need to execute some arbitrary text, use the @code{try} | |
9038
fca0dc2fb042
Cleanup documentation files stmt.texi and func.texi
Rik <rdrider0-list@yahoo.com>
parents:
9032
diff
changeset
|
267 statement instead. @xref{The @code{try} Statement}. |
3294 | 268 |
269 @item | |
270 If you are calling lots of functions but none of them will need to | |
271 change during your run, set the variable | |
272 @code{ignore_function_time_stamp} to @code{"all"} so that Octave doesn't | |
273 waste a lot of time checking to see if you have updated your function | |
274 files. | |
275 @end itemize | |
276 | |
4167 | 277 @node Comment Tips |
3294 | 278 @section Tips on Writing Comments |
279 | |
280 Here are the conventions to follow when writing comments. | |
281 | |
282 @table @samp | |
283 @item # | |
284 Comments that start with a single sharp-sign, @samp{#}, should all be | |
285 aligned to the same column on the right of the source code. Such | |
286 comments usually explain how the code on the same line does its job. In | |
287 the Emacs mode for Octave, the @kbd{M-;} (@code{indent-for-comment}) | |
288 command automatically inserts such a @samp{#} in the right place, or | |
289 aligns such a comment if it is already present. | |
290 | |
291 @item ## | |
7345 | 292 Comments that start with a double sharp-sign, @samp{##}, should be aligned to |
3294 | 293 the same level of indentation as the code. Such comments usually |
294 describe the purpose of the following lines or the state of the program | |
295 at that point. | |
296 @end table | |
297 | |
298 @noindent | |
299 The indentation commands of the Octave mode in Emacs, such as @kbd{M-;} | |
300 (@code{indent-for-comment}) and @kbd{TAB} (@code{octave-indent-line}) | |
301 automatically indent comments according to these conventions, | |
302 depending on the number of semicolons. @xref{Comments,, | |
303 Manipulating Comments, emacs, The GNU Emacs Manual}. | |
304 | |
4167 | 305 @node Function Headers |
3294 | 306 @section Conventional Headers for Octave Functions |
307 @cindex header comments | |
308 | |
309 Octave has conventions for using special comments in function files | |
310 to give information such as who wrote them. This section explains these | |
311 conventions. | |
312 | |
313 The top of the file should contain a copyright notice, followed by a | |
314 block of comments that can be used as the help text for the function. | |
315 Here is an example: | |
316 | |
317 @example | |
6778 | 318 ## Copyright (C) 1996, 1997, 2007 John W. Eaton |
3294 | 319 ## |
320 ## This file is part of Octave. | |
321 ## | |
322 ## Octave is free software; you can redistribute it and/or | |
323 ## modify it under the terms of the GNU General Public | |
324 ## License as published by the Free Software Foundation; | |
7081 | 325 ## either version 3 of the License, or (at your option) any |
326 ## later version. | |
3294 | 327 ## |
328 ## Octave is distributed in the hope that it will be useful, | |
329 ## but WITHOUT ANY WARRANTY; without even the implied | |
330 ## warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | |
331 ## PURPOSE. See the GNU General Public License for more | |
332 ## details. | |
333 ## | |
334 ## You should have received a copy of the GNU General Public | |
335 ## License along with Octave; see the file COPYING. If not, | |
7016 | 336 ## see <http://www.gnu.org/licenses/>. |
3294 | 337 |
338 ## usage: [IN, OUT, PID] = popen2 (COMMAND, ARGS) | |
339 ## | |
340 ## Start a subprocess with two-way communication. COMMAND | |
341 ## specifies the name of the command to start. ARGS is an | |
342 ## array of strings containing options for COMMAND. IN and | |
343 ## OUT are the file ids of the input and streams for the | |
344 ## subprocess, and PID is the process id of the subprocess, | |
345 ## or -1 if COMMAND could not be executed. | |
346 ## | |
347 ## Example: | |
348 ## | |
349 ## [in, out, pid] = popen2 ("sort", "-nr"); | |
350 ## fputs (in, "these\nare\nsome\nstrings\n"); | |
351 ## fclose (in); | |
7768
a2d9f325b65a
Use isschar instead of deprecated isstr
Rafael Laboissiere <rafael@debian.org>
parents:
7345
diff
changeset
|
352 ## while (ischar (s = fgets (out))) |
3294 | 353 ## fputs (stdout, s); |
354 ## endwhile | |
355 ## fclose (out); | |
356 @end example | |
357 | |
358 Octave uses the first block of comments in a function file that do not | |
359 appear to be a copyright notice as the help text for the file. For | |
360 Octave to recognize the first comment block as a copyright notice, it | |
6530 | 361 must start with the word `Copyright' after stripping the leading |
362 comment characters. | |
3294 | 363 |
364 After the copyright notice and help text come several @dfn{header | |
365 comment} lines, each beginning with @samp{## @var{header-name}:}. For | |
366 example, | |
367 | |
368 @example | |
369 @group | |
370 ## Author: jwe | |
371 ## Keywords: subprocesses input-output | |
372 ## Maintainer: jwe | |
373 @end group | |
374 @end example | |
375 | |
376 Here is a table of the conventional possibilities for @var{header-name}: | |
377 | |
378 @table @samp | |
379 @item Author | |
380 This line states the name and net address of at least the principal | |
381 author of the library. | |
382 | |
6670 | 383 @example |
9322 | 384 ## Author: John W. Eaton <jwe@@octave.org> |
6670 | 385 @end example |
3294 | 386 |
387 @item Maintainer | |
388 This line should contain a single name/address as in the Author line, or | |
389 an address only, or the string @samp{jwe}. If there is no maintainer | |
390 line, the person(s) in the Author field are presumed to be the | |
391 maintainers. The example above is mildly bogus because the maintainer | |
392 line is redundant. | |
393 | |
394 The idea behind the @samp{Author} and @samp{Maintainer} lines is to make | |
395 possible a function to ``send mail to the maintainer'' without | |
396 having to mine the name out by hand. | |
397 | |
398 Be sure to surround the network address with @samp{<@dots{}>} if | |
399 you include the person's full name as well as the network address. | |
400 | |
401 @item Created | |
402 This optional line gives the original creation date of the | |
403 file. For historical interest only. | |
404 | |
405 @item Version | |
406 If you wish to record version numbers for the individual Octave program, | |
407 put them in this line. | |
408 | |
409 @item Adapted-By | |
410 In this header line, place the name of the person who adapted the | |
411 library for installation (to make it fit the style conventions, for | |
412 example). | |
413 | |
414 @item Keywords | |
415 This line lists keywords. Eventually, it will be used by an apropos | |
416 command to allow people will find your package when they're looking for | |
417 things by topic area. To separate the keywords, you can use spaces, | |
418 commas, or both. | |
419 @end table | |
420 | |
421 Just about every Octave function ought to have the @samp{Author} and | |
422 @samp{Keywords} header comment lines. Use the others if they are | |
423 appropriate. You can also put in header lines with other header | |
424 names---they have no standard meanings, so they can't do any harm. | |
6574 | 425 |
426 @node Documentation Tips | |
427 @section Tips for Documentation Strings | |
428 | |
429 As noted above, documentation is typically in a commented header block | |
9080
ec41eabf4499
Cleanup documentation files dynamic.texi, testfun.texi, tips.texi
Rik <rdrider0-list@yahoo.com>
parents:
9038
diff
changeset
|
430 on an Octave function following the copyright statement. The help string |
7001 | 431 shown above is an unformatted string and will be displayed as is by |
9080
ec41eabf4499
Cleanup documentation files dynamic.texi, testfun.texi, tips.texi
Rik <rdrider0-list@yahoo.com>
parents:
9038
diff
changeset
|
432 Octave. Here are some tips for the writing of documentation strings. |
6574 | 433 |
434 @itemize @bullet | |
435 @item | |
436 Every command, function, or variable intended for users to know about | |
437 should have a documentation string. | |
438 | |
439 @item | |
440 An internal variable or subroutine of an Octave program might as well have | |
441 a documentation string. | |
442 | |
443 @item | |
444 The first line of the documentation string should consist of one or two | |
445 complete sentences that stand on their own as a summary. | |
446 | |
447 The documentation string can have additional lines that expand on the | |
448 details of how to use the function or variable. The additional lines | |
449 should also be made up of complete sentences. | |
450 | |
451 @item | |
452 For consistency, phrase the verb in the first sentence of a | |
453 documentation string as an infinitive with ``to'' omitted. For | |
454 instance, use ``Return the frob of A and B.'' in preference to ``Returns | |
455 the frob of A and B@.'' Usually it looks good to do likewise for the | |
456 rest of the first paragraph. Subsequent paragraphs usually look better | |
457 if they have proper subjects. | |
458 | |
459 @item | |
460 Write documentation strings in the active voice, not the passive, and in | |
461 the present tense, not the future. For instance, use ``Return a list | |
462 containing A and B.'' instead of ``A list containing A and B will be | |
463 returned.'' | |
464 | |
465 @item | |
466 Avoid using the word ``cause'' (or its equivalents) unnecessarily. | |
467 Instead of, ``Cause Octave to display text in boldface,'' write just | |
468 ``Display text in boldface.'' | |
469 | |
470 @item | |
471 Do not start or end a documentation string with whitespace. | |
472 | |
473 @item | |
474 Format the documentation string so that it fits in an Emacs window on an | |
475 80-column screen. It is a good idea for most lines to be no wider than | |
476 60 characters. | |
477 | |
478 However, rather than simply filling the entire documentation string, you | |
479 can make it much more readable by choosing line breaks with care. | |
480 Use blank lines between topics if the documentation string is long. | |
481 | |
482 @item | |
483 @strong{Do not} indent subsequent lines of a documentation string so | |
484 that the text is lined up in the source code with the text of the first | |
485 line. This looks nice in the source code, but looks bizarre when users | |
486 view the documentation. Remember that the indentation before the | |
487 starting double-quote is not part of the string! | |
488 | |
489 @item | |
490 The documentation string for a variable that is a yes-or-no flag should | |
491 start with words such as ``Nonzero means@dots{}'', to make it clear that | |
492 all nonzero values are equivalent and indicate explicitly what zero and | |
493 nonzero mean. | |
494 | |
495 @item | |
496 When a function's documentation string mentions the value of an argument | |
497 of the function, use the argument name in capital letters as if it were | |
498 a name for that value. Thus, the documentation string of the operator | |
499 @code{/} refers to its second argument as @samp{DIVISOR}, because the | |
500 actual argument name is @code{divisor}. | |
501 | |
502 Also use all caps for meta-syntactic variables, such as when you show | |
503 the decomposition of a list or vector into subunits, some of which may | |
504 vary. | |
505 @end itemize | |
506 | |
507 Octave also allows extensive formatting of the help string of functions | |
508 using Texinfo. The effect on the online documentation is relatively | |
509 small, but makes the help string of functions conform to the help of | |
510 Octave's own functions. However, the effect on the appearance of printed | |
511 or online documentation will be greatly improved. | |
512 | |
513 The fundamental building block of Texinfo documentation strings is the | |
514 Texinfo-macro @code{@@deftypefn}, which takes three arguments: The class | |
515 the function is in, its output arguments, and the function's | |
516 signature. Typical classes for functions include @code{Function File} | |
517 for standard Octave functions, and @code{Loadable Function} for | |
518 dynamically linked functions. A skeletal Texinfo documentation string | |
519 therefore looks like this | |
520 | |
521 @example | |
522 @group | |
523 -*- texinfo -*- | |
9210
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
524 @@deftypefn@{Function File@} @{@@var@{ret@} =@} fn (@dots{}) |
6574 | 525 @@cindex index term |
7081 | 526 Help text in Texinfo format. Code samples should be marked |
527 like @@code@{sample of code@} and variables should be marked | |
528 as @@var@{variable@}. | |
529 @@seealso@{fn2@} | |
6574 | 530 @@end deftypefn |
531 @end group | |
532 @end example | |
533 | |
534 This help string must be commented in user functions, or in the help | |
9209
923c7cb7f13f
Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents:
9080
diff
changeset
|
535 string of the @w{@code{DEFUN_DLD}} macro for dynamically loadable |
6574 | 536 functions. The important aspects of the documentation string are |
537 | |
538 @table @asis | |
10791
3140cb7a05a1
Add spellchecker scripts for Octave and run spellcheck of documentation
Rik <octave@nomad.inbox5.com>
parents:
10284
diff
changeset
|
539 @item -*- @nospell{texinfo} -*- |
8347
fa78cb8d8a5c
corrections for typos
Brian Gough<bjg@network-theory.co.uk>
parents:
7768
diff
changeset
|
540 This string signals Octave that the following text is in Texinfo format, |
6574 | 541 and should be the first part of any help string in Texinfo format. |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
542 |
6574 | 543 @item @@deftypefn@{class@} @dots{} @@end deftypefn |
544 The entire help string should be enclosed within the block defined by | |
545 deftypefn. | |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
546 |
6574 | 547 @item @@cindex index term |
548 This generates an index entry, and can be useful when the function is | |
549 included as part of a larger piece of documentation. It is ignored | |
9210
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
550 within Octave's help viewer. Only one index term may appear per line |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
551 but multiple @@cindex lines are valid if the function should be |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
552 filed under different terms. |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
553 |
6574 | 554 @item @@var@{variable@} |
555 All variables should be marked with this macro. The markup of variables | |
556 is then changed appropriately for display. | |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
557 |
6574 | 558 @item @@code@{sample of code@} |
559 All samples of code should be marked with this macro for the same | |
560 reasons as the @@var macro. | |
10828
322f43e0e170
Grammarcheck .txi documentation files.
Rik <octave@nomad.inbox5.com>
parents:
10812
diff
changeset
|
561 |
6574 | 562 @item @@seealso@{function2@} |
563 This is a comma separated list of function names that allows cross | |
564 referencing from one function documentation string to another. | |
565 @end table | |
566 | |
567 Texinfo format has been designed to generate output for online viewing | |
9210
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
568 with text terminals as well as generating high-quality printed output. |
6574 | 569 To these ends, Texinfo has commands which control the diversion of parts |
570 of the document into a particular output processor. Three formats are | |
10791
3140cb7a05a1
Add spellchecker scripts for Octave and run spellcheck of documentation
Rik <octave@nomad.inbox5.com>
parents:
10284
diff
changeset
|
571 of importance: info, HTML and @TeX{}. These are selected with |
6574 | 572 |
573 @example | |
574 @group | |
575 @@ifinfo | |
576 Text area for info only | |
577 @@end ifinfo | |
578 @end group | |
579 @end example | |
580 | |
581 @example | |
582 @group | |
583 @@ifhtml | |
9210
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
584 Text area for HTML only |
6574 | 585 @@end ifhtml |
586 @end group | |
587 @end example | |
588 | |
589 @example | |
590 @group | |
591 @@tex | |
9210
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
592 Text area for TeX only |
6574 | 593 @@end tex |
594 @end group | |
595 @end example | |
596 | |
10791
3140cb7a05a1
Add spellchecker scripts for Octave and run spellcheck of documentation
Rik <octave@nomad.inbox5.com>
parents:
10284
diff
changeset
|
597 Note that often @TeX{} output can be used in HTML documents and so often |
9080
ec41eabf4499
Cleanup documentation files dynamic.texi, testfun.texi, tips.texi
Rik <rdrider0-list@yahoo.com>
parents:
9038
diff
changeset
|
598 the @code{@@ifhtml} blocks are unnecessary. If no specific output |
6574 | 599 processor is chosen, by default, the text goes into all output |
9080
ec41eabf4499
Cleanup documentation files dynamic.texi, testfun.texi, tips.texi
Rik <rdrider0-list@yahoo.com>
parents:
9038
diff
changeset
|
600 processors. It is usual to have the above blocks in pairs to allow the |
6574 | 601 same information to be conveyed in all output formats, but with a |
9210
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
602 different markup. Currently, most Octave documentation only makes a |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
603 distinction between @TeX{} and all other formats. Therefore, the |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
604 following construct is seen repeatedly. |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
605 |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
606 @example |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
607 @group |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
608 @@tex |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
609 text for TeX only |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
610 @@end tex |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
611 @@ifnottex |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
612 text for info, HTML, plaintext |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
613 @@end ifnottex |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
614 @end group |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
615 @end example |
6574 | 616 |
617 Another important feature of Texinfo that is often used in Octave help | |
9080
ec41eabf4499
Cleanup documentation files dynamic.texi, testfun.texi, tips.texi
Rik <rdrider0-list@yahoo.com>
parents:
9038
diff
changeset
|
618 strings is the @code{@@example} environment. An example of its use is |
6574 | 619 |
620 @example | |
621 @group | |
622 @@example | |
623 @@group | |
624 @@code@{2 * 2@} | |
625 @@result@{@} 4 | |
626 @@end group | |
627 @@end example | |
628 @end group | |
629 @end example | |
630 | |
10846
a4f482e66b65
Grammarcheck more of the documentation.
Rik <octave@nomad.inbox5.com>
parents:
10828
diff
changeset
|
631 @noindent |
6574 | 632 which produces |
633 | |
634 @example | |
635 @group | |
636 @code{2 * 2} | |
637 @result{} 4 | |
638 @end group | |
639 @end example | |
640 | |
641 The @code{@@group} block prevents the example from being split across a | |
642 page boundary, while the @code{@@result@{@}} macro produces a right | |
9210
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
643 arrow signifying the result of a command. If your example is larger than |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
644 20 lines it is better NOT to use grouping so that a reasonable page boundary |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
645 can be calculated. |
6574 | 646 |
8828 | 647 In many cases a function has multiple ways in which it can be called, |
9080
ec41eabf4499
Cleanup documentation files dynamic.texi, testfun.texi, tips.texi
Rik <rdrider0-list@yahoo.com>
parents:
9038
diff
changeset
|
648 and the @code{@@deftypefnx} macro can be used to give alternatives. For |
6574 | 649 example |
650 | |
651 @example | |
652 @group | |
653 -*- texinfo -*- | |
9210
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
654 @@deftypefn@{Function File@} @{@@var@{a@} =@} fn (@@var@{x@}, @dots{}) |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
655 @@deftypefnx@{Function File@} @{@@var@{a@} =@} fn (@@var@{y@}, @dots{}) |
6574 | 656 Help text in Texinfo format. |
657 @@end deftypefn | |
658 @end group | |
659 @end example | |
660 | |
661 Many complete examples of Texinfo documentation can be taken from the | |
9080
ec41eabf4499
Cleanup documentation files dynamic.texi, testfun.texi, tips.texi
Rik <rdrider0-list@yahoo.com>
parents:
9038
diff
changeset
|
662 help strings for the Octave functions themselves. A relatively complete |
ec41eabf4499
Cleanup documentation files dynamic.texi, testfun.texi, tips.texi
Rik <rdrider0-list@yahoo.com>
parents:
9038
diff
changeset
|
663 example of which is the @code{nchoosek} function. The Texinfo |
9210
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
664 documentation string for @code{nchoosek} is |
6574 | 665 |
666 @example | |
667 -*- texinfo -*- | |
7081 | 668 @@deftypefn @{Function File@} @{@} nchoosek (@@var@{n@}, @@var@{k@}) |
6574 | 669 |
7081 | 670 Compute the binomial coefficient or all combinations of |
9080
ec41eabf4499
Cleanup documentation files dynamic.texi, testfun.texi, tips.texi
Rik <rdrider0-list@yahoo.com>
parents:
9038
diff
changeset
|
671 @@var@{n@}. If @@var@{n@} is a scalar then, calculate the |
7081 | 672 binomial coefficient of @@var@{n@} and @@var@{k@}, defined as |
6574 | 673 |
674 @@tex | |
675 $$ | |
676 @{n \choose k@} = @{n (n-1) (n-2) \cdots (n-k+1) \over k!@} | |
677 $$ | |
678 @@end tex | |
9210
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
679 @@ifnottex |
6574 | 680 |
681 @@example | |
682 @@group | |
683 / \ | |
9080
ec41eabf4499
Cleanup documentation files dynamic.texi, testfun.texi, tips.texi
Rik <rdrider0-list@yahoo.com>
parents:
9038
diff
changeset
|
684 | n | n (n-1) (n-2) @dots{} (n-k+1) |
6574 | 685 | | = ------------------------- |
686 | k | k! | |
687 \ / | |
688 @@end group | |
689 @@end example | |
9210
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
690 @@end ifnottex |
6574 | 691 |
7081 | 692 If @@var@{n@} is a vector, this generates all combinations |
693 of the elements of @@var@{n@}, taken @@var@{k@} at a time, | |
9080
ec41eabf4499
Cleanup documentation files dynamic.texi, testfun.texi, tips.texi
Rik <rdrider0-list@yahoo.com>
parents:
9038
diff
changeset
|
694 one row per combination. The resulting @@var@{c@} has size |
7081 | 695 @@code@{[nchoosek (length (@@var@{n@}),@@var@{k@}), @@var@{k@}]@}. |
6574 | 696 |
9210
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
697 @@code@{nchoosek@} works only for non-negative integer arguments; use |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
698 @@code@{bincoeff@} for non-integer scalar arguments and for using vector |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
699 arguments to compute many coefficients at once. |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
700 |
6574 | 701 @@seealso@{bincoeff@} |
702 @@end deftypefn | |
703 @end example | |
704 | |
705 which demonstrates most of the concepts discussed above. | |
706 @iftex | |
707 This documentation string renders as | |
708 | |
709 @c Note actually use the output of info below rather than try and | |
710 @c reproduce it here to prevent it looking different than how it would | |
711 @c appear with info. | |
712 @example | |
713 @group | |
714 -- Function File: C = nchoosek (N, K) | |
7081 | 715 Compute the binomial coefficient or all combinations |
716 of N. If N is a scalar then, calculate the binomial | |
717 coefficient of N and K, defined as | |
6574 | 718 |
719 / \ | |
9080
ec41eabf4499
Cleanup documentation files dynamic.texi, testfun.texi, tips.texi
Rik <rdrider0-list@yahoo.com>
parents:
9038
diff
changeset
|
720 | n | n (n-1) (n-2) @dots{} (n-k+1) n! |
7081 | 721 | | = ------------------------- = --------- |
722 | k | k! k! (n-k)! | |
6574 | 723 \ / |
724 | |
7081 | 725 If N is a vector generate all combinations of the |
726 elements of N, taken K at a time, one row per | |
9080
ec41eabf4499
Cleanup documentation files dynamic.texi, testfun.texi, tips.texi
Rik <rdrider0-list@yahoo.com>
parents:
9038
diff
changeset
|
727 combination. The resulting C has size `[nchoosek |
7081 | 728 (length (N), K), K]'. |
6574 | 729 |
9210
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
730 `nchoosek' works only for non-negative integer |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
731 arguments; use `bincoeff' for non-integer scalar |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
732 arguments and for using vector arguments to compute |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
733 many coefficients at once. |
6574 | 734 |
735 See also: bincoeff. | |
736 @end group | |
737 @end example | |
738 | |
9209
923c7cb7f13f
Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents:
9080
diff
changeset
|
739 using info, whereas in a printed documentation using @TeX{} it will appear |
6574 | 740 as |
741 | |
742 @deftypefn {Function File} {@var{c} =} nchoosek (@var{n}, @var{k}) | |
743 | |
6576 | 744 Compute the binomial coefficient or all combinations of @var{n}. |
6574 | 745 If @var{n} is a scalar then, calculate the binomial coefficient |
746 of @var{n} and @var{k}, defined as | |
747 | |
748 @tex | |
749 $$ | |
750 {n \choose k} = {n (n-1) (n-2) \cdots (n-k+1) \over k!} | |
751 $$ | |
752 @end tex | |
753 | |
754 If @var{n} is a vector generate all combinations of the elements | |
9080
ec41eabf4499
Cleanup documentation files dynamic.texi, testfun.texi, tips.texi
Rik <rdrider0-list@yahoo.com>
parents:
9038
diff
changeset
|
755 of @var{n}, taken @var{k} at a time, one row per combination. The |
6574 | 756 resulting @var{c} has size @code{[nchoosek (length (@var{n}), |
757 @var{k}), @var{k}]}. | |
758 | |
9210
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
759 @code{nchoosek} works only for non-negative integer arguments; use |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
760 @code{bincoeff} for non-integer scalar arguments and for using vector |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
761 arguments to compute many coefficients at once. |
a7a9eecc07b5
Change recommendation for writing documentation to favor @tex
Rik <rdrider0-list@yahoo.com>
parents:
9209
diff
changeset
|
762 |
6574 | 763 @seealso{bincoeff} |
764 @end deftypefn | |
765 | |
766 @end iftex |