Functions | |
endif | if (nargin< 2) n=0 |
if (nargout > 0) if(n > 0) if(n< | |
endif else | if (n > 0) doidx |
endif | if (length(idx)==0) warning("example not available for %s" |
elseif (n >=length(idx)) warning("only %d examples available for %s" | |
length (idx)-1 | |
printf ("%s example %d:%s\n\n", name, doidx(i), block) | |
endfor endif endfunction!demo | !example ('example') |
!plot (t, x)%!assert(example('example' | |
n | example ('example') |
!assert (code,...%!"\n example('example');\n t=0:0.01:2*pi; x=sin(t);\n plot(t,x)")%!assert(idx | |
Variables | |
function [code_r, idx_r] | |
endif [code, idx] = test (name, "grabdemo") | |
idx_r = [1, length(code_r)+1] | |
else | code_r = "" |
else | doidx = 1:length(idx)-1 |
endif | name |
endif for | i |
!demo | !t = 0:0.01:2*pi |
x = sin(t) | |
!test [code, idx] = example('example') | |
!error | example |
!assert | ( | code | ) |
endfor endif endfunction !demo !example | ( | 'example' | ) |
!plot | ( | t | , | |
x | ||||
) |
elseif | ( | n >= | lengthidx | ) |
n example | ( | 'example' | ) |
endif if | ( | length(idx) | = = 0 |
) |
if | ( | nargout | , | |
0 | ||||
) |
endif if | ( | ) | [pure virtual] |
length | ( | idx | ) |
!demo !t = 0:0.01:2*pi |
!test[code, idx] = example('example') |
doidx = 1:length(idx)-1 |
!error example |
x = sin(t) |