!*
[pspp] / doc / flow-control.texi
index f0bf4fe10b77400ed999dd56672f9c1b84f93460..056ffb31310753dddafabbebf29ad12fe165f4f0 100644 (file)
@@ -165,7 +165,8 @@ positional argument.
 
 References to a positional argument in a macro body are numbered:
 @code{!1} is the first positional argument, @code{!2} the second, and
-so on.
+so on.  In addition, @code{!*} expands to all of the positional
+argument values, separated by a space.
 
 The following example uses a positional argument:
 
@@ -205,15 +206,6 @@ FREQUENCIES /VARIABLES=!vars.
 @end example
 @end itemize
 
-@example
-DEFINE !analyze_kw(vars=!CMDEND)
-DESCRIPTIVES !vars.
-FREQUENCIES /VARIABLES=!vars.
-!ENDDEFINE.
-
-!analyze_kw vars=v1 v2 v3.
-@end example
-
 If a macro has both positional and keyword arguments, then the
 positional arguments must come first in the DEFINE command, and their
 values also come first in macro calls.
@@ -243,6 +235,18 @@ Any number of tokens up to @var{token}, which should be an operator or
 punctuator token such as @samp{/} or @samp{+}.  The @var{token} does
 not become part of the value.
 
+With the following variant of @code{!analyze_kw}, the variables must
+be following by @samp{/}:
+
+@example
+DEFINE !analyze_parens(vars=!CHARNED('/'))
+DESCRIPTIVES !vars.
+FREQUENCIES /VARIABLES=!vars.
+!ENDDEFINE.
+
+!analyze_parens vars=v1 v2 v3/.
+@end example
+
 @item !ENCLOSE('@var{start}','@var{end}')
 Any number of tokens enclosed between @var{start} and @var{end}, which
 should each be operator or punctuator tokens.  For example, use
@@ -267,12 +271,24 @@ FREQUENCIES /VARIABLES=!vars.
 Any number of tokens up to the end of the command.  This should be
 used only for the last positional parameter, since it consumes all of
 the tokens in the command calling the macro.
+
+The following variant of @code{!analyze_kw} takes all the variable
+names up to the end of the command as its argument:
+
+@example
+DEFINE !analyze_kw(vars=!CMDEND)
+DESCRIPTIVES !vars.
+FREQUENCIES /VARIABLES=!vars.
+!ENDDEFINE.
+
+!analyze_kw vars=v1 v2 v3.
+@end example
 @end table
 
 By default, when an argument's value contains a macro call, the call
 is expanded each time the argument appears in the macro's body.  The
 @code{!NOEXPAND} keyword in an argument declaration suppresses this
-expansion.
+expansion.  @xref{Controlling Macro Expansion}, for details.
 
 @node Controlling Macro Expansion
 @subsection Controlling Macro Expansion