docs: Improve example in DEFINE.
[pspp] / doc / flow-control.texi
index 72d7a052cd4379bb9fb475c76530b669fcef1f9b..370eddd27f99088c855182b062f8633aeb646e0d 100644 (file)
@@ -194,10 +194,11 @@ DESCRIPTIVES !vars.
 FREQUENCIES /VARIABLES=!vars.
 !ENDDEFINE.
 
+* Initially define the 'vars' macro to analyze v1...v3.
 DEFINE !vars() v1 v2 v3 !ENDDEFINE.
 !commands
 
-* We can redefine the variables macro to analyze different variables:
+* Redefine 'vars' macro to analyze different variables.
 DEFINE !vars() v4 v5 !ENDDEFINE.
 !commands
 @end example
@@ -411,6 +412,10 @@ These rules apply to macro calls, not to uses within a macro body of
 macro functions, macro arguments, and macro variables created by
 @code{!DO} or @code{!LET}, which are always expanded.
 
+@code{SET MEXPAND} may appear within the body of a macro, but it will
+not affect expansion of the macro that it appears in.  Use
+@code{!OFFEXPAND} and @code{!ONEXPAND} instead.
+
 @node Macro Functions
 @subsection Macro Functions
 
@@ -804,10 +809,6 @@ a macro that calls itself.
 MITERATE (@pxref{SET MITERATE}) limits the number of iterations in a
 @code{!DO} construct.  The default is 1000.
 
-PRESERVE...RESTORE
-
-SET MEXPAND, etc. doesn't work inside macro bodies.
-
 @node Macro Notes
 @subsection Additional Notes
 
@@ -816,9 +817,9 @@ SET MEXPAND, etc. doesn't work inside macro bodies.
 If the body of macro A includes a call to macro B, the call can use
 macro arguments (including @code{!*}) and macro variables as part of
 arguments to B.  For @code{!TOKENS} arguments, the argument or
-variable name counts as one token regardless of the number that
-expands into, for @code{!CHAREND} and @code{!ENCLOSE} arguments the
-delimiters come only from the call, not the expansions, and
+variable name counts as one token regardless of the number that it
+expands into; for @code{!CHAREND} and @code{!ENCLOSE} arguments, the
+delimiters come only from the call, not the expansions; and
 @code{!CMDEND} ends at the calling command, not any end of command
 within an argument or variable.