Mercurial > octave
changeset 24359:1da659b26bec stable
doc: grammarcheck of Object Oriented Programming chapter in manual.
* oop.txi: Backport grammarcheck changes to stable branch from cset
3a730821e4a2. Also, remove @group around polynomial2.m function
which is too large to display on a single page without wrapping.
* examples/code/polynomial2.m: Add semicolon to properties definition.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 05 Dec 2017 09:24:05 -0800 |
parents | 3516d922b2bf |
children | ff4717c3223f 9cba59ee9564 |
files | doc/interpreter/oop.txi examples/code/polynomial2.m |
diffstat | 2 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/oop.txi Tue Apr 18 16:45:27 2017 -0700 +++ b/doc/interpreter/oop.txi Tue Dec 05 09:24:05 2017 -0800 @@ -538,7 +538,7 @@ @item @code{a.'} @tab @code{transpose (a)} @tab Transpose @item @code{a:b} @tab @code{colon (a, b)} @tab Two element range @item @code{a:b:c} @tab @code{colon (a, b, c)} @tab Three element range -@item @code{[a, b]} @tab @code{horzcat (a, b)} @tab Horizontal concatenation +@item @code{[a, b]} @tab @code{horzcat (a, b)} @tab Horizontal concatenation @item @code{[a; b]} @tab @code{vertcat (a, b)} @tab Vertical concatenation @item @code{a(s@math{_1},@dots{},s@math{_n})} @tab @code{subsref (a, s)} @tab Subscripted reference @item @code{a(s@math{_1},@dots{},s@math{_n}) = b} @tab @code{subsasgn (a, s, b)} @tab Subscripted assignment @@ -767,7 +767,7 @@ @b{access rights} for properties and methods, @item -@b{static methods}, i.e. methods that are independent of an object, and +@b{static methods}, i.e., methods that are independent of an object, and @item the distinction between @b{value and handle classes}. @@ -814,9 +814,7 @@ shown using the @code{polynomial} example again (@pxref{Creating a Class}): @example -@group @EXAMPLEFILE(polynomial2.m) -@end group @end example @noindent @@ -824,10 +822,12 @@ constructor: @example +@group >> p = polynomial2 ([1, 0, 1]) @result{} p = 1 + X ^ 2 +@end group @end example @node Properties @@ -893,11 +893,10 @@ All class methods must be defined within @code{methods} blocks. An exception to this rule is described at the end of this subsection. Those @code{methods} blocks can have additional attributes specifying the access rights or whether -the methods are static, i.e. methods that can be called without creating an +the methods are static, i.e., methods that can be called without creating an object of that class. @example -@group classdef some_class methods function obj = some_class () @@ -921,7 +920,6 @@ endfunction endmethods endclassdef -@end group @end example The constructor of the class is declared in the @code{methods} block and must @@ -938,10 +936,12 @@ ("@code{.}") and the method's name with subsequent arguments: @example +@group >> obj = some_class (); New instance created. >> disp (obj); # both are >> obj.disp (); # equal +@end group @end example In @code{some_class}, the method @code{func} is defined within a @code{methods}