0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-10-10 00:25:06 -04:00

doc: ALL %if constructs have %elif/%ifn/%elifn variants.

All %if constructs now have %elif/%ifn/%elifn; this is hard-coded into
the preprocessor.
This commit is contained in:
H. Peter Anvin
2008-06-08 16:34:44 -07:00
parent 868067de66
commit 6581802f8b

View File

@@ -2626,6 +2626,10 @@ The inverse forms \i\c{%ifn} and \i\c{%elifn} are also supported.
The \i\c{%else} clause is optional, as is the \i\c{%elif} clause. The \i\c{%else} clause is optional, as is the \i\c{%elif} clause.
You can have more than one \c{%elif} clause as well. You can have more than one \c{%elif} clause as well.
There are a number of variants of the \c{%if} directive. Each has its
corresponding \c{%elif}, \c{%ifn}, and \c{%elifn} directives; for
example, the equivalents to the \c{%ifdef} directive are \c{%elifdef},
\c{%ifndef}, and \c{%elifndef}.
\S{ifdef} \i\c{%ifdef}: Testing Single-Line Macro Existence\I{testing, \S{ifdef} \i\c{%ifdef}: Testing Single-Line Macro Existence\I{testing,
single-line macro existence} single-line macro existence}
@@ -2731,7 +2735,7 @@ they always return either 0 or 1, and treat any non-zero input as 1
is zero, and 0 otherwise). The relational operators also return 1 is zero, and 0 otherwise). The relational operators also return 1
for true and 0 for false. for true and 0 for false.
Like most other \c{%if} constructs, \c{%if} has a counterpart Like other \c{%if} constructs, \c{%if} has a counterpart
\i\c{%elif}, and negative forms \i\c{%ifn} and \i\c{%elifn}. \i\c{%elif}, and negative forms \i\c{%ifn} and \i\c{%elifn}.
\S{ifidn} \i\c{%ifidn} and \i\c{%ifidni}: Testing Exact Text \S{ifidn} \i\c{%ifidn} and \i\c{%ifidni}: Testing Exact Text
@@ -2758,7 +2762,7 @@ stack, and allows you to treat \c{IP} as a real register:
\c \c
\c %endmacro \c %endmacro
Like most other \c{%if} constructs, \c{%ifidn} has a counterpart Like other \c{%if} constructs, \c{%ifidn} has a counterpart
\i\c{%elifidn}, and negative forms \i\c{%ifnidn} and \i\c{%elifnidn}. \i\c{%elifidn}, and negative forms \i\c{%ifnidn} and \i\c{%elifnidn}.
Similarly, \c{%ifidni} has counterparts \i\c{%elifidni}, Similarly, \c{%ifidni} has counterparts \i\c{%elifidni},
\i\c{%ifnidni} and \i\c{%elifnidni}. \i\c{%ifnidni} and \i\c{%elifnidni}.
@@ -2819,10 +2823,10 @@ single string constant, and \c{db %2} would be adequate) or more (in
which case, all but the first two would be lumped together into which case, all but the first two would be lumped together into
\c{%3}, and \c{db %2,%3} would be required). \c{%3}, and \c{db %2,%3} would be required).
\I\c{%ifnid}\I\c{%elifid}\I\c{%elifnid}\I\c{%ifnnum}\I\c{%elifnum} The usual \I\c{%elifid}\I\c{%elifnum}\I\c{%elifstr}\c{%elif}...,
\I\c{%elifnnum}\I\c{%ifnstr}\I\c{%elifstr}\I\c{%elifnstr} \I\c{%ifnid}\I\c{%ifnnum}\I\c{%ifnstr}\c{%ifn}... and
The usual \c{%elifXXX}, \c{%ifnXXX} and \c{%elifnXXX} versions exist \I\c{%elifnid}\I\c{%elifnnum}\I\c{%elifnstr}\c{%elifn}... versions
for each of \c{%ifid}, \c{%ifnum} and \c{%ifstr}. exist for each of \c{%ifid}, \c{%ifnum} and \c{%ifstr}.
\S{iftoken} \i\c{%iftoken}: Test for a Single Token \S{iftoken} \i\c{%iftoken}: Test for a Single Token