X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2Fflow-control.texi;h=7a95758a78b92cb4936dedc6d9b43e70395df59d;hb=7024f0edd9193b70c24fcf76d123b15f00a61180;hp=77b4a3c42e350de55dbff86d2bc8876f06d6b83c;hpb=69bf3f901b0a949cfa957950f55df78d0c86a765;p=pspp diff --git a/doc/flow-control.texi b/doc/flow-control.texi index 77b4a3c42e..7a95758a78 100644 --- a/doc/flow-control.texi +++ b/doc/flow-control.texi @@ -338,6 +338,8 @@ are equivalent; for a quoted string of spaces, use In the examples below, @samp{_} stands in for a space to make the results visible. +@c Keep these examples in sync with the test for !BLANKS in +@c tests/language/control/define.at: @example !BLANKS(0) @expansion{} @r{empty} !BLANKS(1) @expansion{} _ @@ -351,6 +353,8 @@ Expands to the concatenation of all of the arguments. Before concatenation, each quoted string argument is unquoted, as if @code{!UNQUOTE} were applied. +@c Keep these examples in sync with the test for !CONCAT in +@c tests/language/control/define.at: @example !CONCAT(x, y) @expansion{} xy !CONCAT('x', 'y') @expansion{} xy @@ -512,9 +516,26 @@ to uppercase. @node Macro Settings @subsection Macro Settings -MPRINT -MEXPAND -MNEST +Some macro behavior is controlled through the SET command +(@pxref{SET}). This section describes these settings. + +Any SET command that changes these settings within a macro body only +takes effect following the macro. This is because PSPP expands a +macro's entire body at once, so that the SET command inside the body +only executes afterwards. + +The MEXPAND setting (@pxref{SET MEXPAND}) controls whether macros will +be expanded at all. By default, macro expansion is on. To avoid +expansion of macros called within a macro body, use @code{!OFFEXPAND} +and @code{!ONEXPAND} (@pxref{Controlling Macro Expansion}). + +When MPRINT (@pxref{SET MPRINT}) is turned on, PSPP logs an expansion +of each macro in the input. This feature can be useful for debugging +macro definitions. + +MNEST (@pxref{SET MNEST}) limits the depth of expansion of macro +calls, that is, the nesting level of macro expansion. + MITERATE PRESERVE...RESTORE