Mercurial > hg > octave-terminal
changeset 13920:9cf8bd0e13d2
doc: Document %!endfunction keyword
* testfun.txi: Document %!endfunction keyword
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Tue, 22 Nov 2011 20:42:08 -0800 |
parents | 8cb79741769d |
children | 712f45010543 |
files | doc/interpreter/testfun.txi |
diffstat | 1 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/testfun.txi +++ b/doc/interpreter/testfun.txi @@ -167,9 +167,10 @@ @example @group - %!function @var{a} = fn(@var{b}) + %!function @var{a} = fn (@var{b}) %! @var{a} = 2*@var{b}; - %!assert (@var{a}(2),4); + %!endfunction + %!assert (@var{fn}(2), 4); @end group @end example @@ -263,13 +264,16 @@ comment: ignore everything within the block @item %!shared x,y,z -declares variables for use in multiple tests +declare variables for use in multiple tests @item %!function -defines a function value for a shared variable +define a function for use in multiple tests + +@item %!endfunction +close a function definition @item %!assert (x, y, tol) -shorthand for %!test assert (x, y, tol) +shorthand for @code{%!test assert (x, y, tol)} @end table You can also create test scripts for builtins and your own C++