comparison libinterp/octave-value/ov-struct.cc @ 20163:075a5e2e1ba5 stable

doc: Update more docstrings to have one sentence summary as first line. Reviewed build-aux, libinterp/dldfcn, libinterp/octave-value, libinterp/parse-tree directories. * build-aux/mk-opts.pl, libinterp/dldfcn/__magick_read__.cc, libinterp/dldfcn/amd.cc, libinterp/dldfcn/audiodevinfo.cc, libinterp/dldfcn/audioread.cc, libinterp/dldfcn/ccolamd.cc, libinterp/dldfcn/chol.cc, libinterp/dldfcn/colamd.cc, libinterp/dldfcn/convhulln.cc, libinterp/dldfcn/dmperm.cc, libinterp/dldfcn/fftw.cc, libinterp/dldfcn/qr.cc, libinterp/dldfcn/symbfact.cc, libinterp/dldfcn/symrcm.cc, libinterp/octave-value/ov-base.cc, libinterp/octave-value/ov-bool-mat.cc, libinterp/octave-value/ov-cell.cc, libinterp/octave-value/ov-class.cc, libinterp/octave-value/ov-fcn-handle.cc, libinterp/octave-value/ov-fcn-inline.cc, libinterp/octave-value/ov-java.cc, libinterp/octave-value/ov-null-mat.cc, libinterp/octave-value/ov-oncleanup.cc, libinterp/octave-value/ov-range.cc, libinterp/octave-value/ov-struct.cc, libinterp/octave-value/ov-typeinfo.cc, libinterp/octave-value/ov-usr-fcn.cc, libinterp/octave-value/ov.cc, libinterp/parse-tree/lex.ll, libinterp/parse-tree/oct-parse.in.yy, libinterp/parse-tree/pt-binop.cc, libinterp/parse-tree/pt-eval.cc, libinterp/parse-tree/pt-mat.cc: doc: Update more docstrings to have one sentence summary as first line.
author Rik <rik@octave.org>
date Sun, 03 May 2015 21:52:42 -0700
parents 09ed6f7538dd
children
comparison
equal deleted inserted replaced
20162:2645f9ef8c88 20163:075a5e2e1ba5
1782 "-*- texinfo -*-\n\ 1782 "-*- texinfo -*-\n\
1783 @deftypefn {Built-in Function} {@var{s} =} struct ()\n\ 1783 @deftypefn {Built-in Function} {@var{s} =} struct ()\n\
1784 @deftypefnx {Built-in Function} {@var{s} =} struct (@var{field1}, @var{value1}, @var{field2}, @var{value2}, @dots{})\n\ 1784 @deftypefnx {Built-in Function} {@var{s} =} struct (@var{field1}, @var{value1}, @var{field2}, @var{value2}, @dots{})\n\
1785 @deftypefnx {Built-in Function} {@var{s} =} struct (@var{obj})\n\ 1785 @deftypefnx {Built-in Function} {@var{s} =} struct (@var{obj})\n\
1786 \n\ 1786 \n\
1787 Create a scalar or array structure and initialize its values. The\n\ 1787 Create a scalar or array structure and initialize its values.\n\
1788 @var{field1}, @var{field2}, @dots{} variables are strings specifying the\n\
1789 names of the fields and the @var{value1}, @var{value2}, @dots{}\n\
1790 variables can be of any type.\n\
1791 \n\ 1788 \n\
1792 If the values are cell arrays, create a structure array and initialize\n\ 1789 The @var{field1}, @var{field2}, @dots{} variables are strings specifying the\n\
1793 its values. The dimensions of each cell array of values must match.\n\ 1790 names of the fields and the @var{value1}, @var{value2}, @dots{} variables\n\
1794 Singleton cells and non-cell values are repeated so that they fill\n\ 1791 can be of any type.\n\
1795 the entire array. If the cells are empty, create an empty structure\n\ 1792 \n\
1796 array with the specified field names.\n\ 1793 If the values are cell arrays, create a structure array and initialize its\n\
1794 values. The dimensions of each cell array of values must match. Singleton\n\
1795 cells and non-cell values are repeated so that they fill the entire array. \n\
1796 If the cells are empty, create an empty structure array with the specified\n\
1797 field names.\n\
1797 \n\ 1798 \n\
1798 If the argument is an object, return the underlying struct.\n\ 1799 If the argument is an object, return the underlying struct.\n\
1799 \n\ 1800 \n\
1800 Observe that the syntax is optimized for struct @strong{arrays}. Consider\n\ 1801 Observe that the syntax is optimized for struct @strong{arrays}. Consider\n\
1801 the following examples:\n\ 1802 the following examples:\n\
1822 @end example\n\ 1823 @end example\n\
1823 \n\ 1824 \n\
1824 @noindent\n\ 1825 @noindent\n\
1825 The first case is an ordinary scalar struct---one field, one value. The\n\ 1826 The first case is an ordinary scalar struct---one field, one value. The\n\
1826 second produces an empty struct array with one field and no values, since\n\ 1827 second produces an empty struct array with one field and no values, since\n\
1827 s being passed an empty cell array of struct array values. When the value is\n\ 1828 being passed an empty cell array of struct array values. When the value is\n\
1828 a cell array containing a single entry, this becomes a scalar struct with\n\ 1829 a cell array containing a single entry, this becomes a scalar struct with\n\
1829 that single entry as the value of the field. That single entry happens\n\ 1830 that single entry as the value of the field. That single entry happens\n\
1830 to be an empty cell array.\n\ 1831 to be an empty cell array.\n\
1831 \n\ 1832 \n\
1832 Finally, if the value is a non-scalar cell array, then @code{struct}\n\ 1833 Finally, if the value is a non-scalar cell array, then @code{struct}\n\
2120 2121
2121 DEFUN (cell2struct, args, , 2122 DEFUN (cell2struct, args, ,
2122 "-*- texinfo -*-\n\ 2123 "-*- texinfo -*-\n\
2123 @deftypefn {Built-in Function} {} cell2struct (@var{cell}, @var{fields})\n\ 2124 @deftypefn {Built-in Function} {} cell2struct (@var{cell}, @var{fields})\n\
2124 @deftypefnx {Built-in Function} {} cell2struct (@var{cell}, @var{fields}, @var{dim})\n\ 2125 @deftypefnx {Built-in Function} {} cell2struct (@var{cell}, @var{fields}, @var{dim})\n\
2125 Convert @var{cell} to a structure. The number of fields in @var{fields}\n\ 2126 Convert @var{cell} to a structure.\n\
2126 must match the number of elements in @var{cell} along dimension @var{dim},\n\ 2127 \n\
2127 that is @code{numel (@var{fields}) == size (@var{cell}, @var{dim})}.\n\ 2128 The number of fields in @var{fields} must match the number of elements in\n\
2128 If @var{dim} is omitted, a value of 1 is assumed.\n\ 2129 @var{cell} along dimension @var{dim}, that is\n\
2130 @code{numel (@var{fields}) == size (@var{cell}, @var{dim})}. If @var{dim}\n\
2131 is omitted, a value of 1 is assumed.\n\
2129 \n\ 2132 \n\
2130 @example\n\ 2133 @example\n\
2131 @group\n\ 2134 @group\n\
2132 A = cell2struct (@{\"Peter\", \"Hannah\", \"Robert\";\n\ 2135 A = cell2struct (@{\"Peter\", \"Hannah\", \"Robert\";\n\
2133 185, 170, 168@},\n\ 2136 185, 170, 168@},\n\
2327 @deftypefnx {Built-in Function} {} struct_levels_to_print (@var{new_val}, \"local\")\n\ 2330 @deftypefnx {Built-in Function} {} struct_levels_to_print (@var{new_val}, \"local\")\n\
2328 Query or set the internal variable that specifies the number of\n\ 2331 Query or set the internal variable that specifies the number of\n\
2329 structure levels to display.\n\ 2332 structure levels to display.\n\
2330 \n\ 2333 \n\
2331 When called from inside a function with the @qcode{\"local\"} option, the\n\ 2334 When called from inside a function with the @qcode{\"local\"} option, the\n\
2332 variable is changed locally for the function and any subroutines it calls. \n\ 2335 variable is changed locally for the function and any subroutines it calls.\n\
2333 The original variable value is restored when exiting the function.\n\ 2336 The original variable value is restored when exiting the function.\n\
2334 @seealso{print_struct_array_contents}\n\ 2337 @seealso{print_struct_array_contents}\n\
2335 @end deftypefn") 2338 @end deftypefn")
2336 { 2339 {
2337 return SET_INTERNAL_VARIABLE_WITH_LIMITS (struct_levels_to_print, -1, 2340 return SET_INTERNAL_VARIABLE_WITH_LIMITS (struct_levels_to_print, -1,
2344 @deftypefnx {Built-in Function} {@var{old_val} =} print_struct_array_contents (@var{new_val})\n\ 2347 @deftypefnx {Built-in Function} {@var{old_val} =} print_struct_array_contents (@var{new_val})\n\
2345 @deftypefnx {Built-in Function} {} print_struct_array_contents (@var{new_val}, \"local\")\n\ 2348 @deftypefnx {Built-in Function} {} print_struct_array_contents (@var{new_val}, \"local\")\n\
2346 Query or set the internal variable that specifies whether to print struct\n\ 2349 Query or set the internal variable that specifies whether to print struct\n\
2347 array contents.\n\ 2350 array contents.\n\
2348 \n\ 2351 \n\
2349 If true, values of struct array elements are printed.\n\ 2352 If true, values of struct array elements are printed. This variable does\n\
2350 This variable does not affect scalar structures whose elements are always\n\ 2353 not affect scalar structures whose elements are always printed. In both\n\
2351 printed. In both cases, however, printing will be limited to\n\ 2354 cases, however, printing will be limited to the number of levels specified\n\
2352 the number of levels specified by @var{struct_levels_to_print}.\n\ 2355 by @var{struct_levels_to_print}.\n\
2353 \n\ 2356 \n\
2354 When called from inside a function with the @qcode{\"local\"} option, the\n\ 2357 When called from inside a function with the @qcode{\"local\"} option, the\n\
2355 variable is changed locally for the function and any subroutines it calls. \n\ 2358 variable is changed locally for the function and any subroutines it calls.\n\
2356 The original variable value is restored when exiting the function.\n\ 2359 The original variable value is restored when exiting the function.\n\
2357 @seealso{struct_levels_to_print}\n\ 2360 @seealso{struct_levels_to_print}\n\
2358 @end deftypefn") 2361 @end deftypefn")
2359 { 2362 {
2360 return SET_INTERNAL_VARIABLE (print_struct_array_contents); 2363 return SET_INTERNAL_VARIABLE (print_struct_array_contents);