Mercurial > hg > octave-nkf
comparison scripts/help/lookfor.m @ 9133:c0cef1436788
Update help text for sections 2.2 and 2.3 of basics.txi
author | Rik <rdrider0-list@yahoo.com> |
---|---|
date | Fri, 17 Apr 2009 15:16:33 -0700 |
parents | 57649dcecb55 |
children | f22bbc5d56e9 |
comparison
equal
deleted
inserted
replaced
9132:eb1747dbd360 | 9133:c0cef1436788 |
---|---|
15 ## <http://www.gnu.org/licenses/>. | 15 ## <http://www.gnu.org/licenses/>. |
16 | 16 |
17 ## -*- texinfo -*- | 17 ## -*- texinfo -*- |
18 ## @deftypefn {Command} lookfor @var{str} | 18 ## @deftypefn {Command} lookfor @var{str} |
19 ## @deftypefnx {Command} lookfor -all @var{str} | 19 ## @deftypefnx {Command} lookfor -all @var{str} |
20 ## @deftypefnx {Function} {[@var{fun}, @var{helpstring}] =} lookfor (@var{str}) | 20 ## @deftypefnx {Function} {[@var{func}, @var{helpstring}] =} lookfor (@var{str}) |
21 ## @deftypefnx {Function} {[@var{fun}, @var{helpstring}] =} lookfor ('-all', @var{str}) | 21 ## @deftypefnx {Function} {[@var{func}, @var{helpstring}] =} lookfor ('-all', @var{str}) |
22 ## Search for the string @var{str} in all of the functions found in the | 22 ## Search for the string @var{str} in all functions found in the current |
23 ## function search path. By default @code{lookfor} searches for @var{str} | 23 ## function search path. By default, @code{lookfor} searches for @var{str} |
24 ## in the first sentence of the help string of each function found. The entire | 24 ## in the first sentence of the help string of each function found. The entire |
25 ## help string of each function found in the path can be searched if | 25 ## help text of each function can be searched if the '-all' argument is |
26 ## the '-all' argument is supplied. All searches are case insensitive. | 26 ## supplied. All searches are case insensitive. |
27 ## | 27 ## |
28 ## Called with no output arguments, @code{lookfor} prints the list of matching | 28 ## Called with no output arguments, @code{lookfor} prints the list of |
29 ## functions to the terminal. Otherwise the output arguments @var{fun} and | 29 ## matching functions to the terminal. Otherwise, the output arguments |
30 ## @var{helpstring} define the matching functions and the first sentence of | 30 ## @var{func} and @var{helpstring} define the matching functions and the |
31 ## each of their help strings. | 31 ## first sentence of each of their help strings. |
32 ## | 32 ## |
33 ## Note that the ability of @code{lookfor} to correctly identify the first | 33 ## The ability of @code{lookfor} to correctly identify the first |
34 ## sentence of the help of the functions is dependent on the format of the | 34 ## sentence of the help text is dependent on the format of the |
35 ## functions help. All of the functions in Octave itself will correctly | 35 ## function's help. All Octave core functions are correctly |
36 ## find the first sentence, but the same can not be guaranteed for other | 36 ## formatted, but the same can not be guaranteed for external packages and |
37 ## functions. Therefore the use of the '-all' argument might be necessary | 37 ## user-supplied functions. Therefore, the use of the '-all' argument may |
38 ## to find related functions that are not part of Octave. | 38 ## be necessary to find related functions that are not a part of Octave. |
39 ## @seealso{help, which} | 39 ## @seealso{help, doc, which} |
40 ## @end deftypefn | 40 ## @end deftypefn |
41 | 41 |
42 function [out_fun, out_help_text] = lookfor (str, extra) | 42 function [out_fun, out_help_text] = lookfor (str, extra) |
43 if (strcmpi (str, "-all")) | 43 if (strcmpi (str, "-all")) |
44 ## The difference between using '-all' and not, is which part of the caches | 44 ## The difference between using '-all' and not, is which part of the caches |