summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-06-08 16:24:06 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-06-08 16:24:06 -0700
commit66f1d9ffb112645903c5b956b8f3d548009d9b20 (patch)
tree9a1f3b973df7ff35394505976674d2d7b66b7073
parentef0145540ef0b4ed4c75ce3dcf143331a29326df (diff)
downloadnasm-66f1d9ffb112645903c5b956b8f3d548009d9b20.tar.gz
Improve the %iftoken example
-rw-r--r--doc/nasmdoc.src12
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/nasmdoc.src b/doc/nasmdoc.src
index 5016bc71..cadea832 100644
--- a/doc/nasmdoc.src
+++ b/doc/nasmdoc.src
@@ -2834,8 +2834,16 @@ The conditional assembly construct \c{%iftoken} assembles the
subsequent code if and only if the expanded parameters consist of
exactly one token, possibly surrounded by whitespace.
-For example, \c{1} will assemble the subsequent code, but \c{-1} will
-not (\c{-} being an operator.)
+For example:
+
+\c %iftoken 1
+
+will assemble the subsequent code, but
+
+\c %iftoken -1
+
+will not, since \c{-1} contains two tokens: the unary minus operator,
+\c{-}, and the number \c{1}.
The usual \i\c{%eliftoken}, \i\c\{%ifntoken}, and \i\c{%elifntoken}
variants are also provided.