Mercurial > hg > octave-lyh
comparison doc/interpreter/tips.txi @ 4167:aae05d51353c
[project @ 2002-11-12 02:52:50 by jwe]
author | jwe |
---|---|
date | Tue, 12 Nov 2002 02:52:51 +0000 |
parents | bfe1573bd2ae |
children | b2ce28713791 |
comparison
equal
deleted
inserted
replaced
4166:1297e388830f | 4167:aae05d51353c |
---|---|
1 @c Copyright (C) 1996, 1997 John W. Eaton | 1 @c Copyright (C) 1996, 1997 John W. Eaton |
2 @c This is part of the Octave manual. | 2 @c This is part of the Octave manual. |
3 @c For copying conditions, see the file gpl.texi. | 3 @c For copying conditions, see the file gpl.texi. |
4 | 4 |
5 @node Tips, Trouble, System Utilities, Top | 5 @node Tips |
6 @appendix Tips and Standards | 6 @appendix Tips and Standards |
7 @cindex tips | 7 @cindex tips |
8 @cindex standards of coding style | 8 @cindex standards of coding style |
9 @cindex coding standards | 9 @cindex coding standards |
10 | 10 |
18 * Documentation Tips:: Writing readable documentation strings. | 18 * Documentation Tips:: Writing readable documentation strings. |
19 * Comment Tips:: Conventions for writing comments. | 19 * Comment Tips:: Conventions for writing comments. |
20 * Function Headers:: Standard headers for functions. | 20 * Function Headers:: Standard headers for functions. |
21 @end menu | 21 @end menu |
22 | 22 |
23 @node Style Tips, Coding Tips, Tips, Tips | 23 @node Style Tips |
24 @section Writing Clean Octave Programs | 24 @section Writing Clean Octave Programs |
25 | 25 |
26 Here are some tips for avoiding common errors in writing Octave code | 26 Here are some tips for avoiding common errors in writing Octave code |
27 intended for widespread use: | 27 intended for widespread use: |
28 | 28 |
59 Use the same lines that appear at the top of the function files | 59 Use the same lines that appear at the top of the function files |
60 distributed with Octave. If you have not signed papers to assign the | 60 distributed with Octave. If you have not signed papers to assign the |
61 copyright to anyone else, then place your name in the copyright notice. | 61 copyright to anyone else, then place your name in the copyright notice. |
62 @end itemize | 62 @end itemize |
63 | 63 |
64 @node Coding Tips, Documentation Tips, Style Tips, Tips | 64 @node Coding Tips |
65 @section Tips for Making Code Run Faster. | 65 @section Tips for Making Code Run Faster. |
66 @cindex execution speed | 66 @cindex execution speed |
67 @cindex speedups | 67 @cindex speedups |
68 | 68 |
69 Here are some ways of improving the execution speed of Octave programs. | 69 Here are some ways of improving the execution speed of Octave programs. |
119 @code{ignore_function_time_stamp} to @code{"all"} so that Octave doesn't | 119 @code{ignore_function_time_stamp} to @code{"all"} so that Octave doesn't |
120 waste a lot of time checking to see if you have updated your function | 120 waste a lot of time checking to see if you have updated your function |
121 files. | 121 files. |
122 @end itemize | 122 @end itemize |
123 | 123 |
124 @node Documentation Tips, Comment Tips, Coding Tips, Tips | 124 @node Documentation Tips |
125 @section Tips for Documentation Strings | 125 @section Tips for Documentation Strings |
126 | 126 |
127 Here are some tips for the writing of documentation strings. | 127 Here are some tips for the writing of documentation strings. |
128 | 128 |
129 @itemize @bullet | 129 @itemize @bullet |
197 Also use all caps for meta-syntactic variables, such as when you show | 197 Also use all caps for meta-syntactic variables, such as when you show |
198 the decomposition of a list or vector into subunits, some of which may | 198 the decomposition of a list or vector into subunits, some of which may |
199 vary. | 199 vary. |
200 @end itemize | 200 @end itemize |
201 | 201 |
202 @node Comment Tips, Function Headers, Documentation Tips, Tips | 202 @node Comment Tips |
203 @section Tips on Writing Comments | 203 @section Tips on Writing Comments |
204 | 204 |
205 Here are the conventions to follow when writing comments. | 205 Here are the conventions to follow when writing comments. |
206 | 206 |
207 @table @samp | 207 @table @samp |
225 (@code{indent-for-comment}) and @kbd{TAB} (@code{octave-indent-line}) | 225 (@code{indent-for-comment}) and @kbd{TAB} (@code{octave-indent-line}) |
226 automatically indent comments according to these conventions, | 226 automatically indent comments according to these conventions, |
227 depending on the number of semicolons. @xref{Comments,, | 227 depending on the number of semicolons. @xref{Comments,, |
228 Manipulating Comments, emacs, The GNU Emacs Manual}. | 228 Manipulating Comments, emacs, The GNU Emacs Manual}. |
229 | 229 |
230 @node Function Headers, , Comment Tips, Tips | 230 @node Function Headers |
231 @section Conventional Headers for Octave Functions | 231 @section Conventional Headers for Octave Functions |
232 @cindex header comments | 232 @cindex header comments |
233 | 233 |
234 Octave has conventions for using special comments in function files | 234 Octave has conventions for using special comments in function files |
235 to give information such as who wrote them. This section explains these | 235 to give information such as who wrote them. This section explains these |