Mercurial > octave-nkf
comparison libinterp/corefcn/variables.cc @ 20207:4f45eaf83908 stable
doc: Update more docstrings to have one sentence summary as first line.
Reviewed libinterp/corefcn directory.
* libinterp/corefcn/__ilu__.cc, libinterp/corefcn/balance.cc,
libinterp/corefcn/besselj.cc, libinterp/corefcn/betainc.cc,
libinterp/corefcn/bitfcns.cc, libinterp/corefcn/bsxfun.cc,
libinterp/corefcn/cellfun.cc, libinterp/corefcn/colloc.cc,
libinterp/corefcn/conv2.cc, libinterp/corefcn/data.cc,
libinterp/corefcn/debug.cc, libinterp/corefcn/defaults.cc,
libinterp/corefcn/det.cc, libinterp/corefcn/dirfns.cc,
libinterp/corefcn/dlmread.cc, libinterp/corefcn/dot.cc,
libinterp/corefcn/eig.cc, libinterp/corefcn/error.cc,
libinterp/corefcn/fft2.cc, libinterp/corefcn/fftn.cc,
libinterp/corefcn/file-io.cc, libinterp/corefcn/filter.cc,
libinterp/corefcn/find.cc, libinterp/corefcn/gammainc.cc,
libinterp/corefcn/gcd.cc, libinterp/corefcn/getgrent.cc,
libinterp/corefcn/getpwent.cc, libinterp/corefcn/getrusage.cc,
libinterp/corefcn/graphics.cc, libinterp/corefcn/help.cc,
libinterp/corefcn/hex2num.cc, libinterp/corefcn/input.cc,
libinterp/corefcn/inv.cc, libinterp/corefcn/kron.cc,
libinterp/corefcn/load-path.cc, libinterp/corefcn/load-save.cc,
libinterp/corefcn/lookup.cc, libinterp/corefcn/ls-oct-ascii.cc,
libinterp/corefcn/lsode.cc, libinterp/corefcn/lu.cc,
libinterp/corefcn/luinc.cc, libinterp/corefcn/mappers.cc,
libinterp/corefcn/matrix_type.cc, libinterp/corefcn/max.cc,
libinterp/corefcn/md5sum.cc, libinterp/corefcn/mgorth.cc,
libinterp/corefcn/nproc.cc, libinterp/corefcn/oct-hist.cc,
libinterp/corefcn/ordschur.cc, libinterp/corefcn/pager.cc,
libinterp/corefcn/pinv.cc, libinterp/corefcn/pr-output.cc,
libinterp/corefcn/pt-jit.cc, libinterp/corefcn/quad.cc,
libinterp/corefcn/quadcc.cc, libinterp/corefcn/qz.cc,
libinterp/corefcn/rand.cc, libinterp/corefcn/rcond.cc,
libinterp/corefcn/regexp.cc, libinterp/corefcn/schur.cc,
libinterp/corefcn/sighandlers.cc, libinterp/corefcn/sparse.cc,
libinterp/corefcn/spparms.cc, libinterp/corefcn/str2double.cc,
libinterp/corefcn/strfind.cc, libinterp/corefcn/strfns.cc,
libinterp/corefcn/sub2ind.cc, libinterp/corefcn/svd.cc,
libinterp/corefcn/symtab.cc, libinterp/corefcn/syscalls.cc,
libinterp/corefcn/sysdep.cc, libinterp/corefcn/time.cc,
libinterp/corefcn/toplev.cc, libinterp/corefcn/tril.cc,
libinterp/corefcn/tsearch.cc, libinterp/corefcn/typecast.cc,
libinterp/corefcn/urlwrite.cc, libinterp/corefcn/utils.cc,
libinterp/corefcn/variables.cc, scripts/polynomial/spline.m:
Update more docstrings to have one sentence summary as first line.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 09 May 2015 17:19:30 -0700 |
parents | e51473fdb622 |
children | 2ae4a7ef4378 |
comparison
equal
deleted
inserted
replaced
20206:b70f8da6dcd3 | 20207:4f45eaf83908 |
---|---|
351 | 351 |
352 DEFUN (isglobal, args, , | 352 DEFUN (isglobal, args, , |
353 "-*- texinfo -*-\n\ | 353 "-*- texinfo -*-\n\ |
354 @deftypefn {Built-in Function} {} isglobal (@var{name})\n\ | 354 @deftypefn {Built-in Function} {} isglobal (@var{name})\n\ |
355 Return true if @var{name} is a globally visible variable.\n\ | 355 Return true if @var{name} is a globally visible variable.\n\ |
356 \n\ | |
356 For example:\n\ | 357 For example:\n\ |
357 \n\ | 358 \n\ |
358 @example\n\ | 359 @example\n\ |
359 @group\n\ | 360 @group\n\ |
360 global x\n\ | 361 global x\n\ |
544 \n\ | 545 \n\ |
545 @item 0\n\ | 546 @item 0\n\ |
546 @var{name} does not exist.\n\ | 547 @var{name} does not exist.\n\ |
547 @end table\n\ | 548 @end table\n\ |
548 \n\ | 549 \n\ |
549 If the optional argument @var{type} is supplied, check only for\n\ | 550 If the optional argument @var{type} is supplied, check only for symbols of\n\ |
550 symbols of the specified type. Valid types are\n\ | 551 the specified type. Valid types are\n\ |
551 \n\ | 552 \n\ |
552 @table @asis\n\ | 553 @table @asis\n\ |
553 @item @qcode{\"var\"}\n\ | 554 @item @qcode{\"var\"}\n\ |
554 Check only for variables.\n\ | 555 Check only for variables.\n\ |
555 \n\ | 556 \n\ |
567 implemented)\n\ | 568 implemented)\n\ |
568 @end table\n\ | 569 @end table\n\ |
569 \n\ | 570 \n\ |
570 If no type is given, and there are multiple possible matches for name,\n\ | 571 If no type is given, and there are multiple possible matches for name,\n\ |
571 @code{exist} will return a code according to the following priority list:\n\ | 572 @code{exist} will return a code according to the following priority list:\n\ |
572 variable, built-in function, oct-file, directory, file, class. \n\ | 573 variable, built-in function, oct-file, directory, file, class.\n\ |
573 \n\ | 574 \n\ |
574 @code{exist} returns 2 if a regular file called @var{name} is present in\n\ | 575 @code{exist} returns 2 if a regular file called @var{name} is present in\n\ |
575 Octave's search path. If you want information about other types of files\n\ | 576 Octave's search path. If you want information about other types of files\n\ |
576 not on the search path you should use some combination of the functions\n\ | 577 not on the search path you should use some combination of the functions\n\ |
577 @code{file_in_path} and @code{stat} instead.\n\ | 578 @code{file_in_path} and @code{stat} instead.\n\ |
1844 "-*- texinfo -*-\n\ | 1845 "-*- texinfo -*-\n\ |
1845 @deftypefn {Command} {} who\n\ | 1846 @deftypefn {Command} {} who\n\ |
1846 @deftypefnx {Command} {} who pattern @dots{}\n\ | 1847 @deftypefnx {Command} {} who pattern @dots{}\n\ |
1847 @deftypefnx {Command} {} who option pattern @dots{}\n\ | 1848 @deftypefnx {Command} {} who option pattern @dots{}\n\ |
1848 @deftypefnx {Command} {C =} who (\"pattern\", @dots{})\n\ | 1849 @deftypefnx {Command} {C =} who (\"pattern\", @dots{})\n\ |
1849 List currently defined variables matching the given patterns. Valid\n\ | 1850 List currently defined variables matching the given patterns.\n\ |
1850 pattern syntax is the same as described for the @code{clear} command.\n\ | 1851 \n\ |
1852 Valid pattern syntax is the same as described for the @code{clear} command.\n\ | |
1851 If no patterns are supplied, all variables are listed.\n\ | 1853 If no patterns are supplied, all variables are listed.\n\ |
1854 \n\ | |
1852 By default, only variables visible in the local scope are displayed.\n\ | 1855 By default, only variables visible in the local scope are displayed.\n\ |
1853 \n\ | 1856 \n\ |
1854 The following are valid options but may not be combined.\n\ | 1857 The following are valid options, but may not be combined.\n\ |
1855 \n\ | 1858 \n\ |
1856 @table @code\n\ | 1859 @table @code\n\ |
1857 @item global\n\ | 1860 @item global\n\ |
1858 List variables in the global scope rather than the current scope.\n\ | 1861 List variables in the global scope rather than the current scope.\n\ |
1859 \n\ | 1862 \n\ |
1860 @item -regexp\n\ | 1863 @item -regexp\n\ |
1861 The patterns are considered to be regular expressions when matching the\n\ | 1864 The patterns are considered to be regular expressions when matching the\n\ |
1862 variables to display. The same pattern syntax accepted by\n\ | 1865 variables to display. The same pattern syntax accepted by the @code{regexp}\n\ |
1863 the @code{regexp} function is used.\n\ | 1866 function is used.\n\ |
1864 \n\ | 1867 \n\ |
1865 @item -file\n\ | 1868 @item -file\n\ |
1866 The next argument is treated as a filename. All variables found within the\n\ | 1869 The next argument is treated as a filename. All variables found within the\n\ |
1867 specified file are listed. No patterns are accepted when reading variables\n\ | 1870 specified file are listed. No patterns are accepted when reading variables\n\ |
1868 from a file.\n\ | 1871 from a file.\n\ |
1895 @deftypefn {Command} {} whos\n\ | 1898 @deftypefn {Command} {} whos\n\ |
1896 @deftypefnx {Command} {} whos pattern @dots{}\n\ | 1899 @deftypefnx {Command} {} whos pattern @dots{}\n\ |
1897 @deftypefnx {Command} {} whos option pattern @dots{}\n\ | 1900 @deftypefnx {Command} {} whos option pattern @dots{}\n\ |
1898 @deftypefnx {Command} {S =} whos (\"pattern\", @dots{})\n\ | 1901 @deftypefnx {Command} {S =} whos (\"pattern\", @dots{})\n\ |
1899 Provide detailed information on currently defined variables matching the\n\ | 1902 Provide detailed information on currently defined variables matching the\n\ |
1900 given patterns. Options and pattern syntax are the same as for the\n\ | 1903 given patterns.\n\ |
1901 @code{who} command. Extended information about each variable is\n\ | 1904 \n\ |
1902 summarized in a table with the following default entries.\n\ | 1905 Options and pattern syntax are the same as for the @code{who} command.\n\ |
1906 \n\ | |
1907 Extended information about each variable is summarized in a table with the\n\ | |
1908 following default entries.\n\ | |
1903 \n\ | 1909 \n\ |
1904 @table @asis\n\ | 1910 @table @asis\n\ |
1905 @item Attr\n\ | 1911 @item Attr\n\ |
1906 Attributes of the listed variable. Possible attributes are:\n\ | 1912 Attributes of the listed variable. Possible attributes are:\n\ |
1907 \n\ | 1913 \n\ |
2073 | 2079 |
2074 DEFUN (munlock, args, , | 2080 DEFUN (munlock, args, , |
2075 "-*- texinfo -*-\n\ | 2081 "-*- texinfo -*-\n\ |
2076 @deftypefn {Built-in Function} {} munlock ()\n\ | 2082 @deftypefn {Built-in Function} {} munlock ()\n\ |
2077 @deftypefnx {Built-in Function} {} munlock (@var{fcn})\n\ | 2083 @deftypefnx {Built-in Function} {} munlock (@var{fcn})\n\ |
2078 Unlock the named function @var{fcn}. If no function is named\n\ | 2084 Unlock the named function @var{fcn}.\n\ |
2079 then unlock the current function.\n\ | 2085 \n\ |
2086 If no function is named then unlock the current function.\n\ | |
2080 @seealso{mlock, mislocked, persistent}\n\ | 2087 @seealso{mlock, mislocked, persistent}\n\ |
2081 @end deftypefn") | 2088 @end deftypefn") |
2082 { | 2089 { |
2083 octave_value_list retval; | 2090 octave_value_list retval; |
2084 | 2091 |
2110 | 2117 |
2111 DEFUN (mislocked, args, , | 2118 DEFUN (mislocked, args, , |
2112 "-*- texinfo -*-\n\ | 2119 "-*- texinfo -*-\n\ |
2113 @deftypefn {Built-in Function} {} mislocked ()\n\ | 2120 @deftypefn {Built-in Function} {} mislocked ()\n\ |
2114 @deftypefnx {Built-in Function} {} mislocked (@var{fcn})\n\ | 2121 @deftypefnx {Built-in Function} {} mislocked (@var{fcn})\n\ |
2115 Return true if the named function @var{fcn} is locked. If no function is\n\ | 2122 Return true if the named function @var{fcn} is locked.\n\ |
2116 named then return true if the current function is locked.\n\ | 2123 \n\ |
2124 If no function is named then return true if the current function is locked.\n\ | |
2117 @seealso{mlock, munlock, persistent}\n\ | 2125 @seealso{mlock, munlock, persistent}\n\ |
2118 @end deftypefn") | 2126 @end deftypefn") |
2119 { | 2127 { |
2120 octave_value retval; | 2128 octave_value retval; |
2121 | 2129 |
2368 while (0) | 2376 while (0) |
2369 | 2377 |
2370 DEFUN (clear, args, , | 2378 DEFUN (clear, args, , |
2371 "-*- texinfo -*-\n\ | 2379 "-*- texinfo -*-\n\ |
2372 @deftypefn {Command} {} clear [options] pattern @dots{}\n\ | 2380 @deftypefn {Command} {} clear [options] pattern @dots{}\n\ |
2373 Delete the names matching the given patterns from the symbol table. The\n\ | 2381 Delete the names matching the given patterns from the symbol table.\n\ |
2374 pattern may contain the following special characters:\n\ | 2382 \n\ |
2383 The pattern may contain the following special characters:\n\ | |
2375 \n\ | 2384 \n\ |
2376 @table @code\n\ | 2385 @table @code\n\ |
2377 @item ?\n\ | 2386 @item ?\n\ |
2378 Match any single character.\n\ | 2387 Match any single character.\n\ |
2379 \n\ | 2388 \n\ |
2396 @noindent\n\ | 2405 @noindent\n\ |
2397 clears the name @code{foo} and all names that begin with the letter\n\ | 2406 clears the name @code{foo} and all names that begin with the letter\n\ |
2398 @code{b} and end with the letter @code{r}.\n\ | 2407 @code{b} and end with the letter @code{r}.\n\ |
2399 \n\ | 2408 \n\ |
2400 If @code{clear} is called without any arguments, all user-defined\n\ | 2409 If @code{clear} is called without any arguments, all user-defined\n\ |
2401 variables (local and global) are cleared from the symbol table. If\n\ | 2410 variables (local and global) are cleared from the symbol table.\n\ |
2402 @code{clear} is called with at least one argument, only the visible\n\ | 2411 \n\ |
2412 If @code{clear} is called with at least one argument, only the visible\n\ | |
2403 names matching the arguments are cleared. For example, suppose you have\n\ | 2413 names matching the arguments are cleared. For example, suppose you have\n\ |
2404 defined a function @code{foo}, and then hidden it by performing the\n\ | 2414 defined a function @code{foo}, and then hidden it by performing the\n\ |
2405 assignment @code{foo = 2}. Executing the command @kbd{clear foo} once\n\ | 2415 assignment @code{foo = 2}. Executing the command @kbd{clear foo} once\n\ |
2406 will clear the variable definition and restore the definition of\n\ | 2416 will clear the variable definition and restore the definition of\n\ |
2407 @code{foo} as a function. Executing @kbd{clear foo} a second time will\n\ | 2417 @code{foo} as a function. Executing @kbd{clear foo} a second time will\n\ |
2409 \n\ | 2419 \n\ |
2410 The following options are available in both long and short form\n\ | 2420 The following options are available in both long and short form\n\ |
2411 \n\ | 2421 \n\ |
2412 @table @code\n\ | 2422 @table @code\n\ |
2413 @item -all, -a\n\ | 2423 @item -all, -a\n\ |
2414 Clears all local and global user-defined variables and all functions\n\ | 2424 Clear all local and global user-defined variables and all functions from the\n\ |
2415 from the symbol table.\n\ | 2425 symbol table.\n\ |
2416 \n\ | 2426 \n\ |
2417 @item -exclusive, -x\n\ | 2427 @item -exclusive, -x\n\ |
2418 Clears the variables that don't match the following pattern.\n\ | 2428 Clear the variables that don't match the following pattern.\n\ |
2419 \n\ | 2429 \n\ |
2420 @item -functions, -f\n\ | 2430 @item -functions, -f\n\ |
2421 Clears the function names and the built-in symbols names.\n\ | 2431 Clear the function names and the built-in symbols names.\n\ |
2422 \n\ | 2432 \n\ |
2423 @item -global, -g\n\ | 2433 @item -global, -g\n\ |
2424 Clears the global symbol names.\n\ | 2434 Clear global symbol names.\n\ |
2425 \n\ | 2435 \n\ |
2426 @item -variables, -v\n\ | 2436 @item -variables, -v\n\ |
2427 Clears the local variable names.\n\ | 2437 Clear local variable names.\n\ |
2428 \n\ | 2438 \n\ |
2429 @item -classes, -c\n\ | 2439 @item -classes, -c\n\ |
2430 Clears the class structure table and clears all objects.\n\ | 2440 Clears the class structure table and clears all objects.\n\ |
2431 \n\ | 2441 \n\ |
2432 @item -regexp, -r\n\ | 2442 @item -regexp, -r\n\ |
2434 match will be cleared.\n\ | 2444 match will be cleared.\n\ |
2435 @end table\n\ | 2445 @end table\n\ |
2436 \n\ | 2446 \n\ |
2437 With the exception of @code{exclusive}, all long options can be used\n\ | 2447 With the exception of @code{exclusive}, all long options can be used\n\ |
2438 without the dash as well.\n\ | 2448 without the dash as well.\n\ |
2449 @seealso{who, whos, exist}\n\ | |
2439 @end deftypefn") | 2450 @end deftypefn") |
2440 { | 2451 { |
2441 octave_value_list retval; | 2452 octave_value_list retval; |
2442 | 2453 |
2443 int argc = args.length () + 1; | 2454 int argc = args.length () + 1; |
2589 \n\ | 2600 \n\ |
2590 The following command sequences are available:\n\ | 2601 The following command sequences are available:\n\ |
2591 \n\ | 2602 \n\ |
2592 @table @code\n\ | 2603 @table @code\n\ |
2593 @item %a\n\ | 2604 @item %a\n\ |
2594 Prints attributes of variables (g=global, p=persistent,\n\ | 2605 Prints attributes of variables (g=global, p=persistent, f=formal parameter,\n\ |
2595 f=formal parameter, a=automatic variable).\n\ | 2606 a=automatic variable).\n\ |
2596 \n\ | 2607 \n\ |
2597 @item %b\n\ | 2608 @item %b\n\ |
2598 Prints number of bytes occupied by variables.\n\ | 2609 Prints number of bytes occupied by variables.\n\ |
2599 \n\ | 2610 \n\ |
2600 @item %c\n\ | 2611 @item %c\n\ |
2640 The default format is:\n\ | 2651 The default format is:\n\ |
2641 \n\ | 2652 \n\ |
2642 @qcode{\" %a:4; %ln:6; %cs:16:6:1; %rb:12; %lc:-1;@xbackslashchar{}n\"}\n\ | 2653 @qcode{\" %a:4; %ln:6; %cs:16:6:1; %rb:12; %lc:-1;@xbackslashchar{}n\"}\n\ |
2643 \n\ | 2654 \n\ |
2644 When called from inside a function with the @qcode{\"local\"} option, the\n\ | 2655 When called from inside a function with the @qcode{\"local\"} option, the\n\ |
2645 variable is changed locally for the function and any subroutines it calls. \n\ | 2656 variable is changed locally for the function and any subroutines it calls.\n\ |
2646 The original variable value is restored when exiting the function.\n\ | 2657 The original variable value is restored when exiting the function.\n\ |
2647 @seealso{whos}\n\ | 2658 @seealso{whos}\n\ |
2648 @end deftypefn") | 2659 @end deftypefn") |
2649 { | 2660 { |
2650 return SET_INTERNAL_VARIABLE (whos_line_format); | 2661 return SET_INTERNAL_VARIABLE (whos_line_format); |
2659 @deftypefnx {Built-in Function} {} missing_function_hook (@var{new_val}, \"local\")\n\ | 2670 @deftypefnx {Built-in Function} {} missing_function_hook (@var{new_val}, \"local\")\n\ |
2660 Query or set the internal variable that specifies the function to call when\n\ | 2671 Query or set the internal variable that specifies the function to call when\n\ |
2661 an unknown identifier is requested.\n\ | 2672 an unknown identifier is requested.\n\ |
2662 \n\ | 2673 \n\ |
2663 When called from inside a function with the @qcode{\"local\"} option, the\n\ | 2674 When called from inside a function with the @qcode{\"local\"} option, the\n\ |
2664 variable is changed locally for the function and any subroutines it calls. \n\ | 2675 variable is changed locally for the function and any subroutines it calls.\n\ |
2665 The original variable value is restored when exiting the function.\n\ | 2676 The original variable value is restored when exiting the function.\n\ |
2666 @seealso{missing_component_hook}\n\ | 2677 @seealso{missing_component_hook}\n\ |
2667 @end deftypefn") | 2678 @end deftypefn") |
2668 { | 2679 { |
2669 return SET_INTERNAL_VARIABLE (missing_function_hook); | 2680 return SET_INTERNAL_VARIABLE (missing_function_hook); |
2721 "-*- texinfo -*-\n\ | 2732 "-*- texinfo -*-\n\ |
2722 @deftypefn {Built-in Function} {@var{val} =} missing_component_hook ()\n\ | 2733 @deftypefn {Built-in Function} {@var{val} =} missing_component_hook ()\n\ |
2723 @deftypefnx {Built-in Function} {@var{old_val} =} missing_component_hook (@var{new_val})\n\ | 2734 @deftypefnx {Built-in Function} {@var{old_val} =} missing_component_hook (@var{new_val})\n\ |
2724 @deftypefnx {Built-in Function} {} missing_component_hook (@var{new_val}, \"local\")\n\ | 2735 @deftypefnx {Built-in Function} {} missing_component_hook (@var{new_val}, \"local\")\n\ |
2725 Query or set the internal variable that specifies the function to call when\n\ | 2736 Query or set the internal variable that specifies the function to call when\n\ |
2726 a component of Octave is missing. This can be useful for packagers that\n\ | 2737 a component of Octave is missing.\n\ |
2727 may split the Octave installation into multiple sub-packages, for example,\n\ | 2738 \n\ |
2728 to provide a hint to users for how to install the missing components.\n\ | 2739 This can be useful for packagers that may split the Octave installation into\n\ |
2740 multiple sub-packages, for example, to provide a hint to users for how to\n\ | |
2741 install the missing components.\n\ | |
2729 \n\ | 2742 \n\ |
2730 When called from inside a function with the @qcode{\"local\"} option, the\n\ | 2743 When called from inside a function with the @qcode{\"local\"} option, the\n\ |
2731 variable is changed locally for the function and any subroutines it calls. \n\ | 2744 variable is changed locally for the function and any subroutines it calls.\n\ |
2732 The original variable value is restored when exiting the function.\n\ | 2745 The original variable value is restored when exiting the function.\n\ |
2733 \n\ | 2746 \n\ |
2734 The hook function is expected to be of the form\n\ | 2747 The hook function is expected to be of the form\n\ |
2735 \n\ | 2748 \n\ |
2736 @example\n\ | 2749 @example\n\ |