Mercurial > octave
diff doc/interpreter/testfun.txi @ 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 | fd0a3ac60b0e |
children | f07f7dd0d4df |
line wrap: on
line diff
--- a/doc/interpreter/testfun.txi Tue Nov 22 20:10:22 2011 -0800 +++ b/doc/interpreter/testfun.txi Tue Nov 22 20:42:08 2011 -0800 @@ -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++