diff doc/interpreter/func.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 923c7cb7f13f
children fbd7843974fa
line wrap: on
line diff
--- a/doc/interpreter/func.txi	Wed Jan 27 13:30:41 2010 +0100
+++ b/doc/interpreter/func.txi	Wed Jan 27 13:47:02 2010 +0100
@@ -32,6 +32,7 @@
 * Defining Functions::          
 * Multiple Return Values::      
 * Variable-length Argument Lists::  
+* Ignoring Arguments::  
 * Variable-length Return Lists::  
 * Returning From a Function::   
 * Default Arguments::   
@@ -436,6 +437,23 @@
 
 @DOCSTRING(parseparams)
 
+@node Ignoring Arguments
+@section Ignoring Arguments
+
+In the formal argument list, it is possible to use the dummy placeholder @code{~}
+instead of a name. This indicates that the corresponding argument value should be ignored
+and not stored to any variable.
+
+@example
+@group
+function val = pick2nd (~, arg2)
+  val = arg2;
+endfunction
+@end group
+@end example
+
+The value of @code{nargin} is not affected by using this declaration.
+
 @node Variable-length Return Lists
 @section Variable-length Return Lists
 @cindex variable-length return lists