Skip to content

Commit

Permalink
doc: fix the equivalent description for %cond()
Browse files Browse the repository at this point in the history
%cond(x,y,z) == %sel(1+!(x),y,z), not %sel(2-!(x),y,z).

Signed-off-by: H. Peter Anvin <[email protected]>
  • Loading branch information
H. Peter Anvin committed Jun 2, 2024
1 parent 9d38bed commit a1e3140
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/nasmdoc.src
Original file line number Diff line number Diff line change
Expand Up @@ -2892,7 +2892,7 @@ The \c{%cond()} function evaluates its first argument as an
expression, then expands to its second argument if true (nonzero), and
the third, if present, if false (zero). This is in effect a specialized
version of the \i\c{%sel()} function; \c{%cond(x,y,z)} is equivalent
to \c{%sel(2-!(x),y,z)}.
to \c{%sel(1+!(x),y,z)}.

\c %define a 1
\c %xdefine astr %cond(a,"true","false") ; %define astr "true"
Expand Down

0 comments on commit a1e3140

Please sign in to comment.