comparison doc/interpreter/contrib.txi @ 10828:322f43e0e170

Grammarcheck .txi documentation files.
author Rik <octave@nomad.inbox5.com>
date Wed, 28 Jul 2010 12:45:04 -0700
parents 3140cb7a05a1
children a4f482e66b65
comparison
equal deleted inserted replaced
10827:228cd18455a6 10828:322f43e0e170
48 really get familiar with Mercurial. A good place to start is 48 really get familiar with Mercurial. A good place to start is
49 @url{http://www.selenic.com/mercurial/wiki/index.cgi/Tutorial}. There you will 49 @url{http://www.selenic.com/mercurial/wiki/index.cgi/Tutorial}. There you will
50 also find help how to install Mercurial. 50 also find help how to install Mercurial.
51 51
52 A simple contribution sequence could look like this: 52 A simple contribution sequence could look like this:
53
53 @example 54 @example
54 @group 55 @group
55 hg clone http://www.octave.org/hg/octave 56 hg clone http://www.octave.org/hg/octave
56 # make a local copy of the octave 57 # make a local copy of the octave
57 # source repository 58 # source repository
69 70
70 You may want to get familiar with Mercurial queues to manage your changesets. 71 You may want to get familiar with Mercurial queues to manage your changesets.
71 Here is a slightly less simple example using Mercurial queues, where you work 72 Here is a slightly less simple example using Mercurial queues, where you work
72 on two unrelated changesets in parallel and update one of the changesets after 73 on two unrelated changesets in parallel and update one of the changesets after
73 discussion in the maintainers mailing list: 74 discussion in the maintainers mailing list:
75
74 @example 76 @example
75 hg qnew nasty_bug # create a new patch 77 hg qnew nasty_bug # create a new patch
76 # change sources@dots{} 78 # change sources@dots{}
77 hg qref # save the changes into the patch 79 hg qref # save the changes into the patch
78 # change even more@dots{} 80 # change even more@dots{}
157 The preferred comment mark for places that may need further attention is FIXME. 159 The preferred comment mark for places that may need further attention is FIXME.
158 160
159 @node Octave Sources (m-files) 161 @node Octave Sources (m-files)
160 @section Octave Sources (m-files) 162 @section Octave Sources (m-files)
161 163
162 Don't use tabs. Tabs cause trouble. If you are used to them, set up your editor 164 Don't use tabs. Tabs cause trouble. If you are used to them, set up your
163 so that it converts tabs to spaces. Indent the bodies of the statement blocks. 165 editor so that it converts tabs to spaces. Indent the bodies of the statement
164 Recommended indent is 2 spaces. When calling functions, put spaces after commas 166 blocks. Recommended indent is 2 spaces. When calling functions, put spaces
165 and before the calling parentheses, like this: 167 after commas and before the calling parentheses, like this:
166 168
167 @example 169 @example
168 x = max (sin (y+3), 2); 170 x = max (sin (y+3), 2);
169 @end example 171 @end example
170 172
176 @end example 178 @end example
177 179
178 @noindent 180 @noindent
179 Here, putting spaces after @code{sin}, @code{cos} would result in a parse error. 181 Here, putting spaces after @code{sin}, @code{cos} would result in a parse error.
180 In indexing expression, do not put a space after the identifier (this 182 In indexing expression, do not put a space after the identifier (this
181 differentiates indexing and function calls nicely). The space after comma is not 183 differentiates indexing and function calls nicely). The space after comma is
182 necessary if index expressions are simple, i.e., you may write 184 not necessary if index expressions are simple, i.e., you may write
185
183 @example 186 @example
184 A(:,i,j) 187 A(:,i,j)
185 @end example 188 @end example
186 189
187 @noindent 190 @noindent
220 @end example 223 @end example
221 224
222 @node C++ Sources 225 @node C++ Sources
223 @section C++ Sources 226 @section C++ Sources
224 227
225 Don't use tabs. Tabs cause trouble. If you are used to them, set up your editor 228 Don't use tabs. Tabs cause trouble. If you are used to them, set up your
226 so that it converts tabs to spaces. Format function headers like this: 229 editor so that it converts tabs to spaces. Format function headers like this:
227 230
228 @example 231 @example
229 @group 232 @group
230 static bool 233 static bool
231 matches_patterns (const string_vector& patterns, int pat_idx, 234 matches_patterns (const string_vector& patterns, int pat_idx,
259 @noindent 262 @noindent
260 If you have nested @code{if} statements, use extra braces for extra 263 If you have nested @code{if} statements, use extra braces for extra
261 clarification. 264 clarification.
262 265
263 Split long expressions in such a way that a continuation line starts with an 266 Split long expressions in such a way that a continuation line starts with an
264 operator rather than identifier. If the split occurs inside braces, continuation 267 operator rather than identifier. If the split occurs inside braces,
265 should be aligned with the first char after the innermost braces enclosing the 268 continuation should be aligned with the first char after the innermost braces
266 split. Example: 269 enclosing the split. Example:
267 270
268 @example 271 @example
269 @group 272 @group
270 SVD::type type = ((nargout == 0 || nargout == 1) 273 SVD::type type = ((nargout == 0 || nargout == 1)
271 ? SVD::sigma_only 274 ? SVD::sigma_only
318 If you happen to modify a Fortran file, you should stay within Fortran 77 321 If you happen to modify a Fortran file, you should stay within Fortran 77
319 with common extensions like @code{END DO}. Currently, we want all sources 322 with common extensions like @code{END DO}. Currently, we want all sources
320 to be compilable with the f2c and g77 compilers, without special flags if 323 to be compilable with the f2c and g77 compilers, without special flags if
321 possible. This usually means that non-legacy compilers also accept the sources. 324 possible. This usually means that non-legacy compilers also accept the sources.
322 325
323 The M4 macro language is mainly used for Autoconf configuration files. You should 326 The M4 macro language is mainly used for Autoconf configuration files. You
324 follow normal M4 rules when contributing to these files. Some M4 files come 327 should follow normal M4 rules when contributing to these files. Some M4 files
325 from external source, namely the Autoconf archive 328 come from external source, namely the Autoconf archive
326 @url{http://autoconf-archive.cryp.to}. 329 @url{http://autoconf-archive.cryp.to}.
327 330
328 If you give a code example in the documentation written in Texinfo with the 331 If you give a code example in the documentation written in Texinfo with the
329 @code{@@example} environment, you should be aware that the text within such an 332 @code{@@example} environment, you should be aware that the text within such an
330 environment will not be wrapped. It is recommended that you keep the lines 333 environment will not be wrapped. It is recommended that you keep the lines