comparison libinterp/octave-value/ov-struct.cc @ 16816:12005245b645

doc: Periodic grammarcheck of documentation. * doc/interpreter/basics.txi, doc/interpreter/container.txi, doc/interpreter/contrib.txi, doc/interpreter/diagperm.txi, doc/interpreter/errors.txi, doc/interpreter/install.txi, doc/interpreter/sparse.txi, libinterp/corefcn/ellipj.cc, libinterp/corefcn/mappers.cc, libinterp/corefcn/regexp.cc, libinterp/corefcn/tril.cc, libinterp/dldfcn/__init_fltk__.cc, libinterp/dldfcn/fftw.cc, libinterp/interpfcn/dirfns.cc, libinterp/interpfcn/input.cc, libinterp/octave-value/ov-fcn-inline.cc, libinterp/octave-value/ov-struct.cc, scripts/@ftp/cd.m, scripts/general/interp1.m, scripts/general/num2str.m, scripts/image/ind2rgb.m, scripts/image/rgb2ind.m, scripts/io/importdata.m, scripts/io/textread.m, scripts/java/javamem.m, scripts/linear-algebra/condest.m, scripts/linear-algebra/onenormest.m, scripts/miscellaneous/error_ids.m, scripts/miscellaneous/getfield.m, scripts/miscellaneous/setfield.m, scripts/plot/area.m, scripts/plot/pcolor.m, scripts/plot/stairs.m, scripts/set/powerset.m, scripts/sparse/bicg.m, scripts/sparse/bicgstab.m, scripts/sparse/cgs.m, scripts/specfun/ellipke.m, scripts/special-matrix/gallery.m, scripts/strings/strjoin.m, scripts/strings/strsplit.m, scripts/testfun/__have_feature__.m, scripts/testfun/__printf_assert__.m, scripts/testfun/__prog_output_assert__.m, scripts/testfun/__run_test_suite__.m: grammarcheck documentation.
author Rik <rik@octave.org>
date Sat, 22 Jun 2013 19:47:32 -0700
parents 10ed43563df5
children bc924baa2c4e
comparison
equal deleted inserted replaced
16815:7a97ff5ef42e 16816:12005245b645
1749 1749
1750 DEFUN (struct, args, , 1750 DEFUN (struct, args, ,
1751 "-*- texinfo -*-\n\ 1751 "-*- texinfo -*-\n\
1752 @deftypefn {Built-in Function} {} struct (@var{field1}, @var{value1}, @var{field2}, @var{value2}, @dots{})\n\ 1752 @deftypefn {Built-in Function} {} struct (@var{field1}, @var{value1}, @var{field2}, @var{value2}, @dots{})\n\
1753 \n\ 1753 \n\
1754 Create a scalar or array structure and initialize its values. The\n\ 1754 Create a scalar or array structure and initialize its values. The\n\
1755 @var{field1}, @var{field2}, @dots{} variables are strings giving the\n\ 1755 @var{field1}, @var{field2}, @dots{} variables are strings giving the\n\
1756 names of the fields and the @var{value1}, @var{value2}, @dots{}\n\ 1756 names of the fields and the @var{value1}, @var{value2}, @dots{}\n\
1757 variables can be any type.\n\ 1757 variables can be any type.\n\
1758 \n\ 1758 \n\
1759 If the values are cell arrays, create a structure array and initialize\n\ 1759 If the values are cell arrays, create a structure array and initialize\n\
1762 the entire array. If the cells are empty, create an empty structure\n\ 1762 the entire array. If the cells are empty, create an empty structure\n\
1763 array with the specified field names.\n\ 1763 array with the specified field names.\n\
1764 \n\ 1764 \n\
1765 If the argument is an object, return the underlying struct.\n\ 1765 If the argument is an object, return the underlying struct.\n\
1766 \n\ 1766 \n\
1767 Observe that the syntax is optimized for struct @strong{arrays}. Consider the\n\ 1767 Observe that the syntax is optimized for struct @strong{arrays}. Consider\n\
1768 following examples:\n\ 1768 the following examples:\n\
1769 \n\ 1769 \n\
1770 @example\n\ 1770 @example\n\
1771 @group\n\ 1771 @group\n\
1772 struct (\"foo\", 1)\n\ 1772 struct (\"foo\", 1)\n\
1773 @result{} scalar structure containing the fields:\n\ 1773 @result{} scalar structure containing the fields:\n\
1787 \n\ 1787 \n\
1788 @end group\n\ 1788 @end group\n\
1789 @end example\n\ 1789 @end example\n\
1790 \n\ 1790 \n\
1791 @noindent\n\ 1791 @noindent\n\
1792 The first case is an ordinary scalar struct, one field, one value. The\n\ 1792 The first case is an ordinary scalar struct, one field, one value. The\n\
1793 second produces an empty struct array with one field and no values, since\n\ 1793 second produces an empty struct array with one field and no values, since\n\
1794 s being passed an empty cell array of struct array values. When the value is\n\ 1794 s being passed an empty cell array of struct array values. When the value is\n\
1795 a cell array containing a single entry, this becomes a scalar struct with\n\ 1795 a cell array containing a single entry, this becomes a scalar struct with\n\
1796 that single entry as the value of the field. That single entry happens\n\ 1796 that single entry as the value of the field. That single entry happens\n\
1797 to be an empty cell array.\n\ 1797 to be an empty cell array.\n\
1798 \n\ 1798 \n\
1799 Finally, if the value is a non-scalar cell array, then @code{struct}\n\ 1799 Finally, if the value is a non-scalar cell array, then @code{struct}\n\
1800 produces a struct @strong{array}.\n\ 1800 produces a struct @strong{array}.\n\
1801 @end deftypefn") 1801 @end deftypefn")