summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-10-29 21:02:30 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-10-29 21:02:30 -0700
commit8321866bb558068555e548ee35a4e92de94d292b (patch)
tree71c0a430e235820bbb12f7915739d4d91d44a11b /doc
parentad3d21fdb6b2765816edb8863d09d3903e6bd9bb (diff)
downloadnasm-8321866bb558068555e548ee35a4e92de94d292b.tar.gz
doc: cross-reference macro parameter concatenation with %[...]
Explicitly document that %[...] and macro parameters concatenate the same way, and cross-reference the two. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/nasmdoc.src17
1 files changed, 12 insertions, 5 deletions
diff --git a/doc/nasmdoc.src b/doc/nasmdoc.src
index b6831922..35ba19b5 100644
--- a/doc/nasmdoc.src
+++ b/doc/nasmdoc.src
@@ -2051,6 +2051,9 @@ select between them. Similarly, the two statements:
have, in fact, exactly the same effect.
+\c{%[...]} concatenates to adjacent tokens in the same way that
+multi-line macro parameters do, see \k{concat} for details.
+
\S{concat%+} Concatenating Single Line Macro Tokens: \i\c{%+}
@@ -2588,11 +2591,11 @@ iterated through in reverse order.
\S{concat} \i{Concatenating Macro Parameters}
-NASM can concatenate macro parameters on to other text surrounding
-them. This allows you to declare a family of symbols, for example,
-in a macro definition. If, for example, you wanted to generate a
-table of key codes along with offsets into the table, you could code
-something like
+NASM can concatenate macro parameters and macro indirection constructs
+on to other text surrounding them. This allows you to declare a family
+of symbols, for example, in a macro definition. If, for example, you
+wanted to generate a table of key codes along with offsets into the
+table, you could code something like
\c %macro keytab_entry 2
\c
@@ -2638,6 +2641,10 @@ real names of macro-local labels means that the two usages
\c{%\{%foo\}bar} and \c{%%foobar} would both expand to the same
thing anyway; nevertheless, the capability is there.)
+The single-line macro indirection construct, \c{%[...]}
+(\k{indmacro}), behaves the same way as macro parameters for the
+purpose of concatenation.
+
See also the \c{%+} operator, \k{concat%+}.