Mercurial > octave-antonio
comparison scripts/io/strread.m @ 20160:03b9d17a2d95 stable
doc: Update more docstrings to have one sentence summary as first line.
Reviewed io, java, linear-algebra, prefs, and set script directories.
* scripts/io/beep.m, scripts/io/dlmwrite.m, scripts/io/importdata.m,
scripts/io/strread.m, scripts/io/textread.m, scripts/java/javaArray.m,
scripts/java/java_get.m, scripts/java/java_set.m, scripts/java/javaaddpath.m,
scripts/java/javachk.m, scripts/java/javaclasspath.m, scripts/java/javamem.m,
scripts/java/javarmpath.m, scripts/linear-algebra/bandwidth.m,
scripts/linear-algebra/commutation_matrix.m, scripts/linear-algebra/cond.m,
scripts/linear-algebra/condest.m, scripts/linear-algebra/cross.m,
scripts/linear-algebra/duplication_matrix.m, scripts/linear-algebra/expm.m,
scripts/linear-algebra/housh.m, scripts/linear-algebra/isdefinite.m,
scripts/linear-algebra/ishermitian.m, scripts/linear-algebra/issymmetric.m,
scripts/linear-algebra/istril.m, scripts/linear-algebra/istriu.m,
scripts/linear-algebra/krylov.m, scripts/linear-algebra/logm.m,
scripts/linear-algebra/normest.m, scripts/linear-algebra/null.m,
scripts/linear-algebra/onenormest.m, scripts/linear-algebra/orth.m,
scripts/linear-algebra/qzhess.m, scripts/linear-algebra/rank.m,
scripts/linear-algebra/rref.m, scripts/linear-algebra/vech.m,
scripts/path/matlabroot.m, scripts/prefs/addpref.m, scripts/prefs/getpref.m,
scripts/prefs/ispref.m, scripts/prefs/rmpref.m, scripts/prefs/setpref.m,
scripts/set/powerset.m, scripts/set/setdiff.m:
Update more docstrings to have one sentence summary as first line.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 03 May 2015 15:36:23 -0700 |
parents | e51473fdb622 |
children |
comparison
equal
deleted
inserted
replaced
20159:597991b19e40 | 20160:03b9d17a2d95 |
---|---|
30 ## specifier, the second to the second specifier and so forth. If there are | 30 ## specifier, the second to the second specifier and so forth. If there are |
31 ## more words than specifiers, the process is repeated until all words have | 31 ## more words than specifiers, the process is repeated until all words have |
32 ## been processed. | 32 ## been processed. |
33 ## | 33 ## |
34 ## The string @var{format} describes how the words in @var{str} should be | 34 ## The string @var{format} describes how the words in @var{str} should be |
35 ## parsed. | 35 ## parsed. It may contain any combination of the following specifiers: |
36 ## It may contain any combination of the following specifiers: | |
37 ## | 36 ## |
38 ## @table @code | 37 ## @table @code |
39 ## @item %s | 38 ## @item %s |
40 ## The word is parsed as a string. | 39 ## The word is parsed as a string. |
41 ## | 40 ## |
81 ## | 80 ## |
82 ## @example | 81 ## @example |
83 ## [@var{a}, @var{b}, @var{c}] = strread (@var{str}, "%s %s %f"); | 82 ## [@var{a}, @var{b}, @var{c}] = strread (@var{str}, "%s %s %f"); |
84 ## @end example | 83 ## @end example |
85 ## | 84 ## |
86 ## Optional numeric argument @var{format_repeat} can be used for | 85 ## Optional numeric argument @var{format_repeat} can be used for limiting the |
87 ## limiting the number of items read: | 86 ## number of items read: |
88 ## | 87 ## |
89 ## @table @asis | 88 ## @table @asis |
90 ## @item -1 | 89 ## @item -1 |
91 ## (default) read all of the string until the end. | 90 ## (default) read all of the string until the end. |
92 ## | 91 ## |
93 ## @item N | 92 ## @item N |
94 ## Read N times @var{nargout} items. 0 (zero) is an acceptable | 93 ## Read N times @var{nargout} items. 0 (zero) is an acceptable value for |
95 ## value for @var{format_repeat}. | 94 ## @var{format_repeat}. |
96 ## @end table | 95 ## @end table |
97 ## | 96 ## |
98 ## The behavior of @code{strread} can be changed via property-value | 97 ## The behavior of @code{strread} can be changed via property-value pairs. The |
99 ## pairs. The following properties are recognized: | 98 ## following properties are recognized: |
100 ## | 99 ## |
101 ## @table @asis | 100 ## @table @asis |
102 ## @item @qcode{"commentstyle"} | 101 ## @item @qcode{"commentstyle"} |
103 ## Parts of @var{str} are considered comments and will be skipped. | 102 ## Parts of @var{str} are considered comments and will be skipped. |
104 ## @var{value} is the comment style and can be any of the following. | 103 ## @var{value} is the comment style and can be any of the following. |
126 ## Any character in @var{value} will be used to split @var{str} into words | 125 ## Any character in @var{value} will be used to split @var{str} into words |
127 ## (default value = any whitespace). | 126 ## (default value = any whitespace). |
128 ## | 127 ## |
129 ## @item @qcode{"emptyvalue"}: | 128 ## @item @qcode{"emptyvalue"}: |
130 ## Value to return for empty numeric values in non-whitespace delimited data. | 129 ## Value to return for empty numeric values in non-whitespace delimited data. |
131 ## The default is NaN@. When the data type does not support NaN | 130 ## The default is NaN@. When the data type does not support NaN (int32 for |
132 ## (int32 for example), then default is zero. | 131 ## example), then default is zero. |
133 ## | 132 ## |
134 ## @item @qcode{"multipledelimsasone"} | 133 ## @item @qcode{"multipledelimsasone"} |
135 ## Treat a series of consecutive delimiters, without whitespace in between, | 134 ## Treat a series of consecutive delimiters, without whitespace in between, |
136 ## as a single delimiter. Consecutive delimiter series need not be vertically | 135 ## as a single delimiter. Consecutive delimiter series need not be vertically |
137 ## @qcode{"aligned"}. | 136 ## @qcode{"aligned"}. |
143 ## @item @qcode{"returnonerror"} | 142 ## @item @qcode{"returnonerror"} |
144 ## If @var{value} true (1, default), ignore read errors and return normally. | 143 ## If @var{value} true (1, default), ignore read errors and return normally. |
145 ## If false (0), return an error. | 144 ## If false (0), return an error. |
146 ## | 145 ## |
147 ## @item @qcode{"whitespace"} | 146 ## @item @qcode{"whitespace"} |
148 ## Any character in @var{value} will be interpreted as whitespace and | 147 ## Any character in @var{value} will be interpreted as whitespace and trimmed; |
149 ## trimmed; the string defining whitespace must be enclosed in double | 148 ## the string defining whitespace must be enclosed in double quotes for proper |
150 ## quotes for proper processing of special characters like | 149 ## processing of special characters like @qcode{"@xbackslashchar{}t"}. The |
151 ## @qcode{"@xbackslashchar{}t"}. The default value for whitespace is | 150 ## default value for whitespace is |
152 ## @qcode{" @xbackslashchar{}b@xbackslashchar{}r@xbackslashchar{}n@xbackslashchar{}t"} | 151 ## @c Note: the next line specifically has a newline which generates a space |
153 ## (note the space). | 152 ## @c in the output of qcode, but keeps the next line < 80 characters. |
154 ## Unless whitespace is set to '' (empty) AND at least one @qcode{"%s"} format | 153 ## @qcode{" |
155 ## conversion specifier is supplied, a space is always part of whitespace. | 154 ## @xbackslashchar{}b@xbackslashchar{}r@xbackslashchar{}n@xbackslashchar{}t"} |
155 ## (note the space). Unless whitespace is set to @qcode{""} (empty) AND at | |
156 ## least one @qcode{"%s"} format conversion specifier is supplied, a space is | |
157 ## always part of whitespace. | |
156 ## | 158 ## |
157 ## @end table | 159 ## @end table |
158 ## | 160 ## |
159 ## When the number of words in @var{str} doesn't match an exact multiple | 161 ## When the number of words in @var{str} doesn't match an exact multiple of |
160 ## of the number of format conversion specifiers, strread's behavior | 162 ## the number of format conversion specifiers, strread's behavior depends on |
161 ## depends on the last character of @var{str}: | 163 ## the last character of @var{str}: |
162 ## | 164 ## |
163 ## @table @asis | 165 ## @table @asis |
164 ## @item last character = @qcode{"@xbackslashchar{}n"} | 166 ## @item last character = @qcode{"@xbackslashchar{}n"} |
165 ## Data columns are padded with empty fields or Nan so that all columns | 167 ## Data columns are padded with empty fields or Nan so that all columns have |
166 ## have equal length | 168 ## equal length |
167 ## | 169 ## |
168 ## @item last character is not @qcode{"@xbackslashchar{}n"} | 170 ## @item last character is not @qcode{"@xbackslashchar{}n"} |
169 ## Data columns are not padded; strread returns columns of unequal length | 171 ## Data columns are not padded; strread returns columns of unequal length |
170 ## | 172 ## |
171 ## @end table | 173 ## @end table |