diff doc/interpreter/expr.txi @ 10209:ea0d83b4470b

document use of ~ placeholders in the manual
author Jaroslav Hajek <highegg@gmail.com>
date Wed, 27 Jan 2010 13:47:02 +0100
parents 09da0bd91412
children fa0c28aff439
line wrap: on
line diff
--- a/doc/interpreter/expr.txi	Wed Jan 27 13:30:41 2010 +0100
+++ b/doc/interpreter/expr.txi	Wed Jan 27 13:47:02 2010 +0100
@@ -992,6 +992,21 @@
 @end group
 @end example
 
+The symbol @code{~} may be used as a placeholder in the list of lvalues,
+indicating that the corresponding return value should be ignored and not stored
+anywhere:
+
+@example
+@group
+[~, s, v] = svd (a);
+@end group
+@end example
+
+This is cleaner and more efficient than using a dummy variable.
+It is not recommended, however, to reuse such an assignment statement as a right-hand side
+in another expression. Currently, this works as expected, but may cease to work in future
+releases of Octave. The @code{nargout} value for the right-hand side expression is not affected.
+
 @opindex +=
 A very common programming pattern is to increment an existing variable
 with a given value, like this