Mercurial > octave
changeset 24577:6523facc5d81 stable
doc: Cleanup @code example in Appendix on test functions (bug #52852).
* testfun.txi: Add space between "%!" and "assert" to make line a comment.
Use @var{} around variable in @example code.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 09 Jan 2018 21:52:11 -0800 |
parents | 93714122ed59 |
children | 3ee61988e9a9 06eb006b1e0f 5ed2e9248ee9 |
files | doc/interpreter/testfun.txi |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/testfun.txi Tue Jan 09 21:10:38 2018 -0800 +++ b/doc/interpreter/testfun.txi Tue Jan 09 21:52:11 2018 -0800 @@ -211,7 +211,7 @@ %!function @var{a} = fn (@var{b}) %! @var{a} = 2*@var{b}; %!endfunction -%!assert (fn(2), 4) +%! assert (fn(2), 4) @end group @end example @@ -295,11 +295,11 @@ @example @group -function output = must_be_zero (@var{input}) +function @var{output} = must_be_zero (@var{input}) if (@var{input} != 0) error ("Nonzero input!") endif - output = input; + @var{output} = @var{input}; endfunction %!fail ("must_be_zero (1)")